Skip to content

Commit

Permalink
Add read failed log for ledger checker. (#4010)
Browse files Browse the repository at this point in the history
Add read failed log for ledger checker.
  • Loading branch information
horizonzy authored Jul 7, 2023
1 parent a99f2e1 commit fb0d3d6
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ public void readEntryComplete(int rc, long ledgerId, long entryId,
cb.operationComplete(rc, fragment);
}
} else if (!completed.getAndSet(true)) {
if (LOG.isDebugEnabled()) {
LOG.debug("Read {}:{} from {} failed, the error code: {}", ledgerId, entryId, ctx, rc);
}
cb.operationComplete(rc, fragment);
}
}
Expand Down Expand Up @@ -254,7 +257,7 @@ private void verifyLedgerFragment(LedgerFragment fragment,
ReadManyEntriesCallback manycb = new ReadManyEntriesCallback(1,
fragment, cb);
bookieClient.readEntry(bookie, fragment.getLedgerId(), firstStored,
manycb, null, BookieProtocol.FLAG_NONE);
manycb, bookie, BookieProtocol.FLAG_NONE);
} else {
if (lastStored <= firstStored) {
cb.operationComplete(Code.IncorrectParameterException, null);
Expand Down Expand Up @@ -296,7 +299,8 @@ private void verifyLedgerFragment(LedgerFragment fragment,
fragment, cb);
for (Long entryID: entriesToBeVerified) {
acquirePermit();
bookieClient.readEntry(bookie, fragment.getLedgerId(), entryID, manycb, null, BookieProtocol.FLAG_NONE);
bookieClient.readEntry(bookie, fragment.getLedgerId(), entryID, manycb, bookie,
BookieProtocol.FLAG_NONE);
}
}
}
Expand Down

0 comments on commit fb0d3d6

Please sign in to comment.