[ 
https://issues.apache.org/jira/browse/GEODE-7591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17138147#comment-17138147
 ] 

ASF subversion and git services commented on GEODE-7591:
--------------------------------------------------------

Commit 86778ecc5507aaeb28f05b069a80f766f705dbcd in geode's branch 
refs/heads/develop from Jakov Varenina
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=86778ec ]

GEODE-7591: Fix for hang in ClusterDistributionManager (#5182)

* GEODE-7591: Fix for hang in ClusterDistributionManager

Added timeout after which it will be periodically checked whether
distribution manager is disconnecting while waiting on the membership
view installation to avoid hanging

* DUnit test updated

* CyclicBarrier thread synchronization used instad await()
* Future used to wait for completion of test

* DUnit test updated

Exceptions added to test method signature

> potential hang
> --------------
>
>                 Key: GEODE-7591
>                 URL: https://issues.apache.org/jira/browse/GEODE-7591
>             Project: Geode
>          Issue Type: Improvement
>          Components: membership
>            Reporter: Bruce J Schuchardt
>            Assignee: Jakov Varenina
>            Priority: Major
>
> This method in ClusterDistributionManager waits for a new membership view to 
> be installed, but if the cache is being closed while waiting the method could 
> hang because it only checks for cache closure if the object it's waiting on 
> is notified.  We should change the wait() to have a timeout so that the 
> `stopper` is polled periodically
> {code:java}
> void waitForViewInstallation(long id) throws InterruptedException {
>   if (id <= membershipViewIdAcknowledged) {
>     return;
>   }
>   synchronized (membershipViewIdGuard) {
>     while (membershipViewIdAcknowledged < id && 
> !stopper.isCancelInProgress()) {
>       if (logger.isDebugEnabled()) {
>         logger.debug("waiting for view {}.  Current DM view processed by all 
> listeners is {}", id,
>             membershipViewIdAcknowledged);
>       }
>       membershipViewIdGuard.wait();
>     }
>   }
> }
>  {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to