lhotari commented on code in PR #23522:
URL: https://github.com/apache/pulsar/pull/23522#discussion_r1818595792
##########
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());
Review Comment:
Why is a new exception created here? couldn't we just return the original
instance `actEx`?
--
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]