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

Bruce J Schuchardt commented on GEODE-7591:
-------------------------------------------

[~abaker]no, there is no current test demonstrating the problem.  That would be 
part of the work for this ticket.  This method is currently only used by 
transaction failover to wait for locks to be cleaned up.  The method waits on a 
view-installation "guard" object for a new view to be installed but that might 
not happen if the distribution manager is disconnecting.

> 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