Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
r/hb_mgr: check if current replica is a leader when collecting hbeats
Some time ago we made collecting heartbeats an asynchronous process (added yields in between creating hb requests for individual nodes). This made it possible for leadership to be already lost while the request for group is created as the yield happened and previously validated condition no longer holds. Trying to suppress the heartbeat while the replica is not leader lead to assertion. Added a check to make sure the leadership is not lost when actually creating a heartbeat request for the follower. Signed-off-by: Michał Maślanka <michal@redpanda.com>
- Loading branch information