Skip to content

Commit

Permalink
Adjust Log Level for LedgerFencedException in WriteEntryProcessor (#4327
Browse files Browse the repository at this point in the history
)

Signed-off-by: ZhangJian He <[email protected]>
  • Loading branch information
hezhangjian authored May 3, 2024
1 parent c2defe2 commit eee9492
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected void processPacket() {
}
} catch (OperationRejectedException e) {
requestProcessor.getRequestStats().getAddEntryRejectedCounter().inc();
// Avoid to log each occurence of this exception as this can happen when the ledger storage is
// Avoid to log each occurrence of this exception as this can happen when the ledger storage is
// unable to keep up with the write rate.
if (LOG.isDebugEnabled()) {
LOG.debug("Operation rejected while writing {}", request, e);
Expand All @@ -91,7 +91,8 @@ protected void processPacket() {
LOG.error("Error writing {}", request, e);
rc = BookieProtocol.EIO;
} catch (BookieException.LedgerFencedException lfe) {
LOG.error("Attempt to write to fenced ledger", lfe);
LOG.warn("Write attempt on fenced ledger {} by client {}", request.getLedgerId(),
requestHandler.ctx().channel().remoteAddress());
rc = BookieProtocol.EFENCED;
} catch (BookieException e) {
LOG.error("Unauthorized access to ledger {}", request.getLedgerId(), e);
Expand Down

0 comments on commit eee9492

Please sign in to comment.