You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Nabarun Nag (Jira)" <ji...@apache.org> on 2021/09/03 02:25:08 UTC

[jira] [Closed] (GEODE-7591) potential hang

     [ https://issues.apache.org/jira/browse/GEODE-7591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nabarun Nag closed GEODE-7591.
------------------------------

> 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
>             Fix For: 1.14.0
>
>
> 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)