You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/07/13 00:28:48 UTC
[GitHub] [kafka] hachikuji commented on a diff in pull request #12394: Minor : Improve Exception log
hachikuji commented on code in PR #12394:
URL: https://github.com/apache/kafka/pull/12394#discussion_r919541236
##########
core/src/main/scala/kafka/cluster/Partition.scala:
##########
@@ -1154,8 +1154,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 " +
Review Comment:
I agree the message is misleading. Thanks for fixing. Do we need to report the size at all? Could we just report the current ISR?
```scala
s"The current ISR $inSyncReplicaIds for topic partition $topicPartition does not have enough replicas to satisfy min.insync.replicas=$minIsr"
```
Or something like that?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org