Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
8994: Fix notification of snapshot replication listeners about missed events r=oleschoenburg a=oleschoenburg ## Description Whenever a raft partition transitions to a new role, we must reset `missedSnapshotReplicationEvents` so that registering new snapshot replication listeners does not trigger the listener for snapshot replication events that occurred for a different role. This is to guard against a known case where raft received a snapshot and transitioned to leader before role change and snapshot replication listeners were registered. Once the registration of the snapshot replication listener registration went through, the listener was informed about the missed replication and caused the zeebe partition to transition to follower, while the raft partition was leader. Additionally, because we keep track of missed snapshot replication events to notify listeners on registering, the partition is not necessarily in follower role at that point. This breaks the assumption of the listener, so we add a condition here to only trigger listeners on register if the raft partition is still follower. ## Related issues relates to #8830 closes #8978 Co-authored-by: Ole Schönburg <ole.schoenburg@gmail.com>
- Loading branch information