You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/06/24 06:48:30 UTC

[GitHub] [pulsar] jerrypeng commented on a change in pull request #7351: Fix race condition in which exitFuture in FunctionAssignmentTailer never gets completed even though the tailer thread has exited

jerrypeng commented on a change in pull request #7351:
URL: https://github.com/apache/pulsar/pull/7351#discussion_r444679824



##########
File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionAssignmentTailer.java
##########
@@ -113,6 +112,11 @@ public synchronized void close() {
                     }
                 }
                 tailerThread = null;
+
+                // complete exit future to be safe
+                exitFuture.complete(null);
+                // reset the future
+                exitFuture = new CompletableFuture<>();

Review comment:
       just reset it because this object can be close() and start() again




----------------------------------------------------------------
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.

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