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 26b6634ec46 MINOR: Fix misleading log message when lastOffset < 
firstOffset in SharePartition (#22208)
26b6634ec46 is described below

commit 26b6634ec46706bc1d7e941d85c3da0ec1caaec9
Author: majialong <[email protected]>
AuthorDate: Sat May 9 01:23:04 2026 +0800

    MINOR: Fix misleading log message when lastOffset < firstOffset in 
SharePartition (#22208)
    
    Fix inverted log message text and argument order in `SharePartition`
    when `lastOffset < firstOffset`.
    
    Reviewers: Chia-Ping Tsai <[email protected]>
---
 core/src/main/java/kafka/server/share/SharePartition.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/src/main/java/kafka/server/share/SharePartition.java 
b/core/src/main/java/kafka/server/share/SharePartition.java
index abe6bf53e83..02d0cb14413 100644
--- a/core/src/main/java/kafka/server/share/SharePartition.java
+++ b/core/src/main/java/kafka/server/share/SharePartition.java
@@ -503,9 +503,9 @@ public class SharePartition {
                     }
 
                     if (stateBatch.lastOffset() < stateBatch.firstOffset()) {
-                        log.error("Invalid state batch found for the share 
partition: {}-{}. The first offset: {}"
-                                + " is less than the last offset of the batch: 
{}.", groupId, topicIdPartition,
-                            stateBatch.firstOffset(), stateBatch.lastOffset());
+                        log.error("Invalid state batch found for the share 
partition: {}-{}. The last offset: {}"
+                                + " is less than the first offset of the 
batch: {}.", groupId, topicIdPartition,
+                            stateBatch.lastOffset(), stateBatch.firstOffset());
                         throwable = new 
IllegalStateException(String.format("Failed to initialize the share partition 
%s-%s", groupId, topicIdPartition));
                         return;
                     }

Reply via email to