Skip to content

Commit

Permalink
MINOR : Improve Exception log in NotEnoughReplicasException(apache#12394
Browse files Browse the repository at this point in the history
)

Reviewers: Manikumar Reddy <[email protected]>
  • Loading branch information
nicolasguyomar authored Jan 7, 2025
1 parent 48b522f commit 2fc35c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/main/scala/kafka/cluster/Partition.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2fc35c8

Please sign in to comment.