sijie commented on a change in pull request #7319:
URL: https://github.com/apache/pulsar/pull/7319#discussion_r443334325



##########
File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerImpl.java
##########
@@ -3177,8 +3177,7 @@ protected void asyncCreateLedger(BookKeeper bookKeeper, 
ManagedLedgerConfig conf
                 digestType, config.getPassword(), cb, ledgerCreated, 
finalMetadata);
         scheduledExecutor.schedule(() -> {
             if (!ledgerCreated.get()) {
-                ledgerCreated.set(true);
-                cb.createComplete(BKException.Code.TimeoutException, null, 
null);
+                cb.createComplete(BKException.Code.TimeoutException, null, 
ledgerCreated);

Review comment:
       I see. I missed the createNewMetadataLedger operation. I changed it to 
use CAS.
   
   For canceling the timeout tasks, I will have a follow-up issue to do that.




----------------------------------------------------------------
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:
[email protected]


Reply via email to