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/07/08 14:25:16 UTC

[GitHub] [pulsar] merlimat commented on a change in pull request #7473: [pulsar-broker] Cleanup already deleted namespace topics

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



##########
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:
       Since we're treating it as a "success" case here, another option would be to have the close request to return "ok" when closing a non-existing producer. what do you think?




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