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


##########
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) {

Review Comment:
   nit: if we combine notWaitDisconnectClients and waitDisconnectClients to 
closingOrDeleting
   ```java
              if (isClosingOrDeleting && closeFutures.closingOrDeleting != 
null) {
                    return closeFutures.closingOrDeleting;
              }
   ```



-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to