heesung-sn commented on code in PR #17524:
URL: https://github.com/apache/pulsar/pull/17524#discussion_r1449296028


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -1507,24 +1556,42 @@ public CompletableFuture<Void> close(
         CompletableFuture<Void> closeFuture = new CompletableFuture<>();
 
         lock.writeLock().lock();
+        CompletableFuture<Void> inProgressTransferCloseTask = null;
         try {
             if (!disconnectClients) {
                 transferring = true;
             }
             // closing managed-ledger waits until all 
producers/consumers/replicators get closed. Sometimes, broker
             // forcefully wants to close managed-ledger without waiting all 
resources to be closed.
-            if (!isClosingOrDeleting || closeWithoutWaitingClientDisconnect) {
-                fenceTopicToCloseOrDelete();
+            if (isClosingOrDeleting) {
+                if (!disconnectClients) {

Review Comment:
   nit: add a comment.
   
   // Dedup the first-phase close from Transfer. Do not run the first-phase 
close multiple times.  



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