Jason Gustafson created KAFKA-13972: ---------------------------------------
Summary: Reassignment cancellation causes stray replicas Key: KAFKA-13972 URL: https://issues.apache.org/jira/browse/KAFKA-13972 Project: Kafka Issue Type: Bug Reporter: Jason Gustafson A stray replica is one that is left behind on a broker after the partition has been reassigned to other brokers or the partition has been deleted. We found one case where this can happen is after a cancelled reassignment. When a reassignment is cancelled, the controller sends `StopReplica` requests to any of the adding replicas, but it does not necessarily bump the leader epoch. Following [KIP-570|[https://cwiki.apache.org/confluence/display/KAFKA/KIP-570%3A+Add+leader+epoch+in+StopReplicaRequest],] brokers will ignore `StopReplica` requests if the leader epoch matches the current partition leader epoch. So we need to bump the epoch whenever we need to ensure that `StopReplica` will be received. -- This message was sent by Atlassian Jira (v8.20.7#820007)