Table of Contents |
---|
Status
Current state: DiscussionAdopted
Discussion thread: here
JIRA:
Jira | ||||||
---|---|---|---|---|---|---|
|
Jira | ||||||
---|---|---|---|---|---|---|
|
Jira | ||||||
---|---|---|---|---|---|---|
|
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
...
We will change the semantics of the "UnderReplicated" metric to only take taking into account the active replica assignment. In other words, we will subtract the AddingReplica from both the total replicas and the current ISR when determining URP satisfaction. AddingReplicas. Specifically, we will use the following formula:
Code Block |
---|
isUnderReplicated == size(original assigned replicas) - size(isr) > 0 |
We count a partition as under-replicated if the current isr is smaller than the size of the current replica set. This allows us to count AddingReplicas which makes this metric consistent with UnderMinIsr criteria. Note that a reassignment may change the number of replicas, but URP satisfaction will not take this into account until the reassignment is complete.
Similarly, we will change the behavior of the kafka topic command so that `--under-replicated-partitions` returns results consistent with the change above. Because the adding/removing replicas are not visible from the Metadata API, we will use the new ListReassignment API.
...
As described above, this KIP changes the semantics of `kafka.server:type=ReplicaManager,name=
UnderReplicatedPartitions`UnderReplicatedPartitions
`. Replicas which are being added as part of a reassignment will not count toward this value.
We will also add some additional metrics to improve monitoring for reassignments. The table below shows all of the changes from this KIP.
Metric | Is New | Type | Includes Current Assigned Replicas | Includes Reassigning Replicas |
---|---|---|---|---|
kafka.server:type=ReplicaManager,name=UnderReplicatedPartitions | No | Gauge | Yes | No |
kafka.server:type=ReplicaManager,name=ReassigningPartitions | Yes | Gauge | No | Yes |
kafka.server:type=ReplicaManager,name=ReassignmentMaxLag | Yes | Gauge | No | Yes |
kafka.server:type=BrokerTopicMetrics,name=ReassignmentBytesOutPerSec | Yes | Meter | No | Yes |
kafka.server:type=BrokerTopicMetrics,name=ReassignmentBytesInPerSec | Yes | Meter | No | Yes |
Note that the `ReassignmentBytesOutPerSec`
and `ReassignmentBytesInPerSec`
meters are broker-level metrics. We are not proposing any topic-level metrics for tracking reassignment progress.
ReassignmentMaxLag
will be implemented separately as it requires some more consideration. JIRA is linked on the top of the KIP.
Compatibility, Deprecation, and Migration Plan
...