poorbarcode commented on code in PR #19825:
URL: https://github.com/apache/pulsar/pull/19825#discussion_r1138579140
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/MetaStoreImpl.java:
##########
@@ -301,11 +302,17 @@ public void asyncRemoveCursor(String ledgerName, String
cursorName, MetaStoreCal
}
callback.operationComplete(null, null);
}, executor.chooseThread(ledgerName))
- .exceptionally(ex -> {
+ .exceptionallyAsync(ex -> {
+ Throwable actEx = FutureUtil.unwrapCompletionException(ex);
+ if (actEx instanceof
MetadataStoreException.NotFoundException){
+ log.info("[{}] [{}] cursor delete done because it did
not exist.", ledgerName, cursorName);
+ callback.operationComplete(null, null);
+ return null;
+ }
executor.executeOrdered(ledgerName,
SafeRunnable.safeRun(() -> callback
.operationFailed(getException(ex))));
return null;
- });
+ }, executor.chooseThread(ledgerName));
Review Comment:
Good suggestion, fixed
--
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]