rdhabalia commented on a change in pull request #7473:
URL: https://github.com/apache/pulsar/pull/7473#discussion_r451810264



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentReplicator.java
##########
@@ -760,11 +761,13 @@ private void checkReplicatedSubscriptionMarker(Position 
position, MessageImpl<?>
         final CompletableFuture<Void> future = new CompletableFuture<>();
 
         super.disconnect(failIfHasBacklog).thenRun(() -> {
-            dispatchRateLimiter.ifPresent(DispatchRateLimiter::close);
-            future.complete(null);
+            cleanAfterDisconnect(future);
         }).exceptionally(ex -> {
             Throwable t = (ex instanceof CompletionException ? ex.getCause() : 
ex);
-            if (t instanceof TopicBusyException == false) {
+            if (t instanceof AlreadyClosedException) {
+                cleanAfterDisconnect(future);

Review comment:
       @merlimat Yes, I don't see any issue by returning success on 
non-existing producer or consumer. I made that change. Can you please review it 
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:
[email protected]


Reply via email to