Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Status

Current state: DiscussionAdopted

Discussion thread: here

JIRA: 

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-8834
 
Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-8835
Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-9059

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.

MetricIs NewType

Includes Current

Assigned Replicas

Includes Reassigning

Replicas

kafka.server:type=ReplicaManager,name=UnderReplicatedPartitionsNoGaugeYesNo
kafka.server:type=ReplicaManager,name=ReassigningPartitionsYesGaugeNoYes
kafka.server:type=ReplicaManager,name=ReassignmentMaxLagYesGaugeNoYes
kafka.server:type=BrokerTopicMetrics,name=ReassignmentBytesOutPerSecYesMeterNoYes
kafka.server:type=BrokerTopicMetrics,name=ReassignmentBytesInPerSecYesMeterNoYes

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

...