poorbarcode commented on code in PR #23522:
URL: https://github.com/apache/pulsar/pull/23522#discussion_r1818603424
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/MetaStoreImpl.java:
##########
@@ -398,10 +398,11 @@ private static ManagedLedgerInfo
updateMLInfoTimestamp(ManagedLedgerInfo info) {
}
private static MetaStoreException getException(Throwable t) {
- if (t.getCause() instanceof
MetadataStoreException.BadVersionException) {
- return new
ManagedLedgerException.BadVersionException(t.getMessage());
+ Throwable actEx = FutureUtil.unwrapCompletionException(t);
+ if (actEx instanceof MetadataStoreException.BadVersionException) {
+ return new
ManagedLedgerException.BadVersionException(actEx.getMessage());
} else {
- return new MetaStoreException(t);
+ return new MetaStoreException(actEx);
Review Comment:
Improved
--
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]