This is an automated email from the ASF dual-hosted git repository.
jlprat pushed a commit to branch 4.0
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/4.0 by this push:
new 0ad0b44a064 MINOR: Fix log messages for epoch comparison in
ReplicationControlManager (#21729)
0ad0b44a064 is described below
commit 0ad0b44a064ac4538bb9c07e29b50769c1c4b476
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 596ca221360..ca968bc09c8 100644
---
a/metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java
+++
b/metadata/src/main/java/org/apache/kafka/controller/ReplicationControlManager.java
@@ -1248,13 +1248,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;
}