mirror of https://github.com/apache/kafka.git
CI / build (push) Waiting to run
Details
The current ElectionWasClean checks if the new leader is in the previous ISR. However, there is a corner case in the partition reassignment. The partition reassignment can change the partition replicas. If the new preferred leader (the first one in the new replicas) is the last one to join ISR, this preferred leader will be elected in the same partition change. For example: In the previous state, the partition is Leader: 0, Replicas (2,1,0), ISR (1,0), Adding(2), removing(0). Then replica 2 joins the ISR. The new partition would be like: Leader: 2, Replicas (2,1), ISR(1,2). The new leader 2 is not in the previous ISR (1,0) but it is still a clean election. Reviewers: Jun Rao <junrao@gmail.com> |
||
---|---|---|
.. | ||
src | ||
.gitignore |