eolivelli commented on a change in pull request #2384:
URL: https://github.com/apache/bookkeeper/pull/2384#discussion_r459972085



##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/AbstractZkLedgerManager.java
##########
@@ -459,7 +460,8 @@ public void processResult(int rc, String path, Object ctx, 
byte[] data, Stat sta
                     promise.complete(new Versioned<>(metadata, version));
                 } catch (Throwable t) {
                     LOG.error("Could not parse ledger metadata for ledger: 
{}", ledgerId, t);
-                    promise.completeExceptionally(new 
BKException.ZKException());
+                    promise.completeExceptionally(new BKException.ZKException(
+                            new Exception("Could not parse ledger metadata for 
ledger: "+ledgerRootPath, t).fillInStackTrace()));

Review comment:
       done, thanks

##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/meta/AbstractZkLedgerManager.java
##########
@@ -444,12 +444,13 @@ public void processResult(int rc, String path, Object 
ctx, byte[] data, Stat sta
                 if (rc != KeeperException.Code.OK.intValue()) {
                     LOG.error("Could not read metadata for ledger: " + 
ledgerId,
                               
KeeperException.create(KeeperException.Code.get(rc), path));
-                    promise.completeExceptionally(new 
BKException.ZKException());
+                    promise.completeExceptionally(new 
BKException.ZKException(KeeperException.create(Code.get(rc), path)));
                     return;
                 }
                 if (stat == null) {
                     LOG.error("Could not parse ledger metadata for ledger: {}. 
Stat object is null", ledgerId);
-                    promise.completeExceptionally(new 
BKException.ZKException());
+                    promise.completeExceptionally(new BKException.ZKException(
+                            new Exception("Could not parse ledger metadata for 
ledger: "+ledgerId+" . Stat object is null").fillInStackTrace()));

Review comment:
       done, thanks




----------------------------------------------------------------
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.

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


Reply via email to