You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by ch...@apache.org on 2022/09/05 02:55:48 UTC

[bookkeeper] branch master updated: Optimize log for failed to write entry (#3463)

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

chenhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new 1adc0414bd Optimize log for failed to write entry (#3463)
1adc0414bd is described below

commit 1adc0414bd96fd4eda67837d980e9df37471f631
Author: Xiaoyu Hou <An...@gmail.com>
AuthorDate: Mon Sep 5 10:55:43 2022 +0800

    Optimize log for failed to write entry (#3463)
    
    Descriptions of the changes in this PR:
    
    Print bookie address when writing entry failed
    
    ### Motivation
    
    Printing bookie info will be help for solving online problem
    ### Changes
    
    Print bookie address when writing entry failed
---
 .../src/main/java/org/apache/bookkeeper/client/PendingAddOp.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java
index 4c826aed85..d04f0d146c 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java
@@ -371,8 +371,8 @@ class PendingAddOp extends SafeRunnable implements WriteCallback {
                     }
                 }
             } else {
-                LOG.warn("Failed to write entry ({}, {}): {}",
-                        ledgerId, entryId, BKException.getMessage(rc));
+                LOG.warn("Failed to write entry ({}, {}) to bookie ({}, {}): {}",
+                        ledgerId, entryId, bookieIndex, addr, BKException.getMessage(rc));
                 lh.handleBookieFailure(ImmutableMap.of(bookieIndex, addr));
             }
             return;