Skip to content

Commit 4766b29

Browse files
authored
MINOR: Fix typos in UnifiedLog and LocalLog exception messages (#22107)
Fix misleading log messages in UnifiedLog and LocalLog close methods Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Ken Huang <s7133700@gmail.com>
1 parent dc5f816 commit 4766b29

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

storage/src/main/java/org/apache/kafka/storage/internals/log/LocalLog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public void closeHandlers() {
322322
*/
323323
public void close() {
324324
maybeHandleIOException(
325-
() -> "Error while renaming dir for " + topicPartition + " in dir " + dir.getParent(),
325+
() -> "Error while closing log segments for " + topicPartition + " in dir " + dir.getParent(),
326326
() -> {
327327
checkIfMemoryMappedBufferClosed();
328328
segments.close();

storage/src/main/java/org/apache/kafka/storage/internals/log/UnifiedLog.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ public void close() {
957957
localLog.checkIfMemoryMappedBufferClosed();
958958
producerExpireCheck.cancel(true);
959959
maybeHandleIOException(
960-
() -> "Error while renaming dir for " + topicPartition() + " in dir " + dir().getParent(),
960+
() -> "Error while taking producer state snapshot for " + topicPartition() + " in dir " + dir().getParent(),
961961
() -> {
962962
// We take a snapshot at the last written offset to hopefully avoid the need to scan the log
963963
// after restarting and to ensure that we cannot inadvertently hit the upgrade optimization
@@ -2321,7 +2321,7 @@ public long latestProducerStateEndOffset() {
23212321
// visible for testing
23222322
public void flushProducerStateSnapshot(Path snapshot) {
23232323
maybeHandleIOException(
2324-
() -> "Error while deleting producer state snapshot " + snapshot + " for " + topicPartition() + " in dir " + dir().getParent(),
2324+
() -> "Error while flushing producer state snapshot " + snapshot + " for " + topicPartition() + " in dir " + dir().getParent(),
23252325
() -> {
23262326
Utils.flushFileIfExists(snapshot);
23272327
return null;

0 commit comments

Comments
 (0)