You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ma...@apache.org on 2025/01/07 14:51:13 UTC
(kafka) branch trunk updated: MINOR : Improve Exception log in NotEnoughReplicasException(#12394)
This is an automated email from the ASF dual-hosted git repository.
manikumar 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 2fc35c81be0 MINOR : Improve Exception log in NotEnoughReplicasException(#12394)
2fc35c81be0 is described below
commit 2fc35c81be0e7d06f003621f71e61aa1ab1a8ff0
Author: NICOLAS GUYOMAR <ni...@gmail.com>
AuthorDate: Tue Jan 7 15:51:02 2025 +0100
MINOR : Improve Exception log in NotEnoughReplicasException(#12394)
Reviewers: Manikumar Reddy <ma...@gmail.com>
---
core/src/main/scala/kafka/cluster/Partition.scala | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/core/src/main/scala/kafka/cluster/Partition.scala b/core/src/main/scala/kafka/cluster/Partition.scala
index 9a9286ff51a..e58f5824e76 100755
--- a/core/src/main/scala/kafka/cluster/Partition.scala
+++ b/core/src/main/scala/kafka/cluster/Partition.scala
@@ -1398,8 +1398,9 @@ class Partition(val topicPartition: TopicPartition,
// Avoid writing to leader if there are not enough insync replicas to make it safe
if (inSyncSize < minIsr && requiredAcks == -1) {
- throw new NotEnoughReplicasException(s"The size of the current ISR ${partitionState.isr} " +
- s"is insufficient to satisfy the min.isr requirement of $minIsr for partition $topicPartition")
+ throw new NotEnoughReplicasException(s"The size of the current ISR : $inSyncSize " +
+ s"is insufficient to satisfy the min.isr requirement of $minIsr for partition $topicPartition, " +
+ s"live replica(s) broker.id are : $inSyncReplicaIds")
}
val info = leaderLog.appendAsLeader(records, leaderEpoch = this.leaderEpoch, origin,