This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch branch-4.16
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/branch-4.16 by this push:
     new d86ca0b160 Adjust Log Level for LedgerFencedException in 
WriteEntryProcessor (#4327)
d86ca0b160 is described below

commit d86ca0b160a2bfd3ed968b623ab8c5ef5e44cb48
Author: ZhangJian He <shoot...@gmail.com>
AuthorDate: Fri May 3 15:58:27 2024 +0800

    Adjust Log Level for LedgerFencedException in WriteEntryProcessor (#4327)
    
    Signed-off-by: ZhangJian He <shoot...@gmail.com>
    (cherry picked from commit eee9492f2d3d7983911c50f13f7589e845c80179)
---
 .../main/java/org/apache/bookkeeper/proto/WriteEntryProcessor.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/WriteEntryProcessor.java
 
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/WriteEntryProcessor.java
index 0cd01c7970..d611ab963a 100644
--- 
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/WriteEntryProcessor.java
+++ 
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/WriteEntryProcessor.java
@@ -81,7 +81,7 @@ class WriteEntryProcessor extends 
PacketProcessorBase<ParsedAddRequest> implemen
             }
         } 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);
@@ -91,7 +91,8 @@ class WriteEntryProcessor extends 
PacketProcessorBase<ParsedAddRequest> implemen
             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);

Reply via email to