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 15:57:12 UTC

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

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

 ##########
 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:
   Mostly, I started pulling the thread and changing the seek behavior to avoid closing consumers in between. I'll pull that change out (in different PR) and apply it before this PR.

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