[ https://issues.apache.org/jira/browse/KAFKA-8695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexandre Dupriez resolved KAFKA-8695. -------------------------------------- Resolution: Duplicate De-duplicating in favor of [KAFKA-4680|http://issues.apache.org/jira/browse/KAFKA-4680]. > Metrics UnderReplicated and UnderMinIsr are diverging when configuration is > inconsistent > ---------------------------------------------------------------------------------------- > > Key: KAFKA-8695 > URL: https://issues.apache.org/jira/browse/KAFKA-8695 > Project: Kafka > Issue Type: Bug > Components: core > Affects Versions: 2.1.0, 2.2.0, 2.1.1, 2.3.0 > Reporter: Alexandre Dupriez > Assignee: Alexandre Dupriez > Priority: Minor > > As of now, Kafka allows the replication factor of a topic and > "min.insync.replicas" to be set such that "min.insync.replicas" > the topic's > replication factor. > As a consequence, the JMX beans > {code:java} > kafka.cluster:type=Partition,name=UnderReplicated{code} > and > {code:java} > kafka.cluster:type=Partition,name=UnderMinIsr{code} > can report diverging views on the replication for a topic. The former can > report no under replicated partition, while the second will report under > in-sync replicas. > Even worse, consumption of topics which exhibit this behaviour seems to fail, > the Kafka broker throwing a NotEnoughReplicasException. > {code:java} > [2019-07-22 10:44:29,913] ERROR [ReplicaManager broker=0] Error processing > append operation on partition __consumer_offsets-0 > (kafka.server.ReplicaManager) > org.apache.kafka.common.errors.NotEnoughReplicasException: The size of the > current ISR Set(0) is insufficient to satisfy the min.isr requirement of 2 > for partition __consumer_offsets-0 {code} > In order to avoid this scenario, one possibility would be to check the values > of "min.insync.replicas" and "default.replication.factor" when the broker > starts, and "min.insync.replicas" and the replication factor given to a topic > at creation time, and refuses to create the topic if those are inconsistently > set. > -- This message was sent by Atlassian JIRA (v7.6.14#76016)