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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to