You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/05 15:48:04 UTC

[GitHub] [pulsar] 315157973 commented on a diff in pull request #15425: [PIP 81] Part-1 Split createNewMetadataLedger into multiple methods for reuse

315157973 commented on code in PR #15425:
URL: https://github.com/apache/pulsar/pull/15425#discussion_r866060430


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java:
##########
@@ -2786,6 +2787,9 @@ public void operationComplete(Void result, Stat stat) {
             @Override
             public void operationFailed(MetaStoreException e) {
                 log.warn("[{}] Failed to update consumer {}", ledger.getName(), name, e);
+                // it means it failed to switch the newly created ledger so, it should be
+                // deleted to prevent leak
+                deleteLedger(lh);

Review Comment:
   <img width="810" alt="image" src="https://user-images.githubusercontent.com/9758905/166961907-d75f2020-b890-430c-b663-a5b41ddba4e0.png">
   I removed the useless wrapper callback, so I had to add the removal logic here



-- 
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-unsubscribe@pulsar.apache.org

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