poorbarcode commented on code in PR #17524:
URL: https://github.com/apache/pulsar/pull/17524#discussion_r1447319246


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -1376,8 +1380,11 @@ private CompletableFuture<Void> delete(boolean 
failIfHasSubscriptions,
             }
 
             fenceTopicToCloseOrDelete(); // Avoid clients reconnections while 
deleting
+            // Mark the progress of close to prevent close calling 
concurrently.
+            this.closeWithoutWaitingClientFuture = new CompletableFuture<>();
+            this.fullyCloseFuture = new CompletableFuture<>();

Review Comment:
   `Topic.close` and `Topic.delete` may be called more than once. See 
`unfenceTopicToResume()`, so both futures can not be marked as `final`.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to