...
This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.
Status
Current state: Drafting
Discussion thread: Not ready yet
JIRA: KAFKA-7904
Motivation
Today, a topic partition may be categorized as:
...
In this example, AtMinIsr triggers when there is only 1 insync replica remaining, and tells us that 1 more failure will cause the partition to go completely offline!
Public Interfaces
We will introduce a new metric and a new TopicCommand option to identify AtMinIsr partitions.
Code Block |
---|
ReplicaManager.AtMinIsrPartitions --at-min-isr-partitions |
Proposed Changes
We will add the gauge to Partition.scala:
...
Code Block |
---|
private val reportAtMinIsrPartitionsOpt = parser.accepts("at-min-isr-partitions", "if set when describing topics, only show partitions whose isr count is equal to the configured minimum. Not supported with the --zookeeper option.") private def hasAtMinIsrPartitions(partitionDescription: PartitionDescription) = { partitionDescription.isr.size == partitionDescription.minIsrCount } private def shouldPrintAtMinIsrPartitions(partitionDescription: PartitionDescription) = { opts.reportAtMinIsrPartitions && hasAtMinIsrPartitions(partitionDescription) } |
Compatibility, Deprecation, and Migration Plan
The new TopicCommand option requires use of AdminClient so it will not be available with the --zookeeper option.
Rejected Alternatives
None so far.