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

jlprat pushed a commit to branch 4.2
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/4.2 by this push:
     new ea2487f6d5a MINOR: Fix log messages for epoch comparison in 
ReplicationControlManager (#21729)
ea2487f6d5a is described below

commit ea2487f6d5a8fcee3a371815adbb51ebd3692dc1
Author: Giuseppe Lillo <[email protected]>
AuthorDate: Fri Mar 13 20:12:10 2026 +0100

    MINOR: Fix log messages for epoch comparison in ReplicationControlManager 
(#21729)
    
    Log messages in
    
    
`org.apache.kafka.controller.ReplicationControlManager#validateAlterPartitionData`
    are misleading and are not coherent with the other log messages (where
    "current" indicate the controller state coming from
    PartitionRegistration).
    
    Reviewers: Josep Prat <[email protected]>
---
 .../java/org/apache/kafka/controller/ReplicationControlManager.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java
 
b/metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java
index a1e93b3f10f..8bd37ab5265 100644
--- 
a/metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java
+++ 
b/metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java
@@ -1252,13 +1252,13 @@ public class ReplicationControlManager {
         // this case to give the leader an opportunity to find the new 
controller.
         if (partitionData.leaderEpoch() > partition.leaderEpoch) {
             log.debug("Rejecting AlterPartition request from node {} for {}-{} 
because " +
-                    "the current leader epoch is {}, which is greater than the 
local value {}.",
+                    "the current leader epoch is {}, which is lower than the 
request value {}. {}",
                 brokerId, topic.name, partitionId, partition.leaderEpoch, 
partitionData.leaderEpoch());
             return NOT_CONTROLLER;
         }
         if (partitionData.partitionEpoch() > partition.partitionEpoch) {
             log.debug("Rejecting AlterPartition request from node {} for {}-{} 
because " +
-                    "the current partition epoch is {}, which is greater than 
the local value {}.",
+                    "the current partition epoch is {}, which is lower than 
the request value {}. {}",
                 brokerId, topic.name, partitionId, partition.partitionEpoch, 
partitionData.partitionEpoch());
             return NOT_CONTROLLER;
         }

Reply via email to