Skip to content

Commit 1adc041

Browse files
authored
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
1 parent a266c92 commit 1adc041

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,8 @@ public void writeComplete(int rc, long ledgerId, long entryId, BookieId addr, Ob
371371
}
372372
}
373373
} else {
374-
LOG.warn("Failed to write entry ({}, {}): {}",
375-
ledgerId, entryId, BKException.getMessage(rc));
374+
LOG.warn("Failed to write entry ({}, {}) to bookie ({}, {}): {}",
375+
ledgerId, entryId, bookieIndex, addr, BKException.getMessage(rc));
376376
lh.handleBookieFailure(ImmutableMap.of(bookieIndex, addr));
377377
}
378378
return;

0 commit comments

Comments
 (0)