This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 4766b293b71 MINOR: Fix typos in UnifiedLog and LocalLog exception
messages (#22107)
4766b293b71 is described below
commit 4766b293b71d9e56c43afac68e6c4080cb7ee5e7
Author: Jiayao Sun <[email protected]>
AuthorDate: Wed Apr 22 03:27:40 2026 +1200
MINOR: Fix typos in UnifiedLog and LocalLog exception messages (#22107)
Fix misleading log messages in UnifiedLog and LocalLog close methods
Reviewers: Chia-Ping Tsai <[email protected]>, Ken Huang
<[email protected]>
---
.../main/java/org/apache/kafka/storage/internals/log/LocalLog.java | 2 +-
.../main/java/org/apache/kafka/storage/internals/log/UnifiedLog.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
a/storage/src/main/java/org/apache/kafka/storage/internals/log/LocalLog.java
b/storage/src/main/java/org/apache/kafka/storage/internals/log/LocalLog.java
index 030a0d30594..5649b674a67 100644
--- a/storage/src/main/java/org/apache/kafka/storage/internals/log/LocalLog.java
+++ b/storage/src/main/java/org/apache/kafka/storage/internals/log/LocalLog.java
@@ -322,7 +322,7 @@ public class LocalLog {
*/
public void close() {
maybeHandleIOException(
- () -> "Error while renaming dir for " + topicPartition + " in dir
" + dir.getParent(),
+ () -> "Error while closing log segments for " + topicPartition + "
in dir " + dir.getParent(),
() -> {
checkIfMemoryMappedBufferClosed();
segments.close();
diff --git
a/storage/src/main/java/org/apache/kafka/storage/internals/log/UnifiedLog.java
b/storage/src/main/java/org/apache/kafka/storage/internals/log/UnifiedLog.java
index b9f9ca3f8eb..8d38a02d209 100644
---
a/storage/src/main/java/org/apache/kafka/storage/internals/log/UnifiedLog.java
+++
b/storage/src/main/java/org/apache/kafka/storage/internals/log/UnifiedLog.java
@@ -957,7 +957,7 @@ public class UnifiedLog implements AutoCloseable {
localLog.checkIfMemoryMappedBufferClosed();
producerExpireCheck.cancel(true);
maybeHandleIOException(
- () -> "Error while renaming dir for " + topicPartition() +
" in dir " + dir().getParent(),
+ () -> "Error while taking producer state snapshot for " +
topicPartition() + " in dir " + dir().getParent(),
() -> {
// We take a snapshot at the last written offset to
hopefully avoid the need to scan the log
// after restarting and to ensure that we cannot
inadvertently hit the upgrade optimization
@@ -2321,7 +2321,7 @@ public class UnifiedLog implements AutoCloseable {
// visible for testing
public void flushProducerStateSnapshot(Path snapshot) {
maybeHandleIOException(
- () -> "Error while deleting producer state snapshot " +
snapshot + " for " + topicPartition() + " in dir " + dir().getParent(),
+ () -> "Error while flushing producer state snapshot " +
snapshot + " for " + topicPartition() + " in dir " + dir().getParent(),
() -> {
Utils.flushFileIfExists(snapshot);
return null;