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 2019/09/25 11:00:46 UTC

[GitHub] [pulsar] ivankelly commented on a change in pull request #5022: Fixed the cleanup of non-durable cursors when a reader is closed

ivankelly commented on a change in pull request #5022: Fixed the cleanup of non-durable cursors when a reader is closed
URL: https://github.com/apache/pulsar/pull/5022#discussion_r328058010
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java
 ##########
 @@ -621,70 +627,46 @@ private void resetCursor(Position finalPosition, CompletableFuture<Void> future)
             return;
         }
 
-        final CompletableFuture<Void> disconnectFuture;
-
-        // Lock the Subscription object before locking the Dispatcher object to avoid deadlocks
-        synchronized (this) {
-            if (dispatcher != null && dispatcher.isConsumerConnected()) {
-                disconnectFuture = dispatcher.disconnectAllConsumers();
-            } else {
-                disconnectFuture = CompletableFuture.completedFuture(null);
-            }
+        if (dispatcher != null) {
 
 Review comment:
   Can you explain the change in this method in the PR description?

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


With regards,
Apache Git Services