You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/05/20 19:14:17 UTC

[GitHub] [geode] jinmeiliao commented on a diff in pull request #7697: GEODE-10304: locator thread should not exit after reconnecting

jinmeiliao commented on code in PR #7697:
URL: https://github.com/apache/geode/pull/7697#discussion_r878477658


##########
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java:
##########
@@ -1043,7 +1046,15 @@ public void waitToStop() throws InterruptedException {
         while (system.isConnected()) {
           Thread.sleep(5000);
         }
+        // there would be a gap between stoppedForReconnect being to true and attemptingToReconnect
+        // being true, if system.waitUntilReconnected happened in between, this method would return
+        // with "restarted" being false, so we need also to wait till system is reconnecting
         logger.info("waiting for distributed system to reconnect...");
+        while (!system.isReconnecting()) {

Review Comment:
   All other changes are just refactoring to use lamda instead of Runnable interface. Only this change is what matters.



##########
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java:
##########
@@ -1043,7 +1046,15 @@ public void waitToStop() throws InterruptedException {
         while (system.isConnected()) {
           Thread.sleep(5000);
         }
+        // there would be a gap between stoppedForReconnect being to true and attemptingToReconnect
+        // being true, if system.waitUntilReconnected happened in between, this method would return
+        // with "restarted" being false, so we need also to wait till system is reconnecting
         logger.info("waiting for distributed system to reconnect...");
+        while (!system.isReconnecting()) {

Review Comment:
   All other changes are just refactoring to use lamda instead of Runnable interface. Only this change is what matters.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org