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


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -1600,7 +1671,14 @@ public void closeFailed(ManagedLedgerException 
exception, Object ctx) {
             closeFuture.completeExceptionally(exception);
             return null;
         });
-
+        if (!disconnectClients) {
+            FutureUtil.completeAfter(closeFutures.notDisconnectClients, 
closeFuture);
+        } else {
+            FutureUtil.completeAfter(closeFutures.notDisconnectClients, 
closeFuture);
+            FutureUtil.completeAfter(closeFutures.notWaitDisconnectClients, 
closeFuture);

Review Comment:
   - call `close(true /* disconnectClients */, true /* 
closeWithoutWaitingClientDisconnect */)` will return `notWaitDisconnectClients` 
cached.
   - call `close(false /* disconnectClients */)` will return 
`notDisconnectClients` cached
   
   See more details at the description of the internal class `CloseFutures` 
[here](https://github.com/apache/pulsar/pull/17524/files#diff-5edf14cc6f25857d0cfdd26b2d3b3141230ecfb0dfa95aebf7583fd76ede4c4bR275-R288)



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