-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
c/leaders: trigger leadership notification when term changes #16776
Conversation
When term changes but leader stays on the same we should still trigger the leadership notification. Downstream components like `leadership_balancer` rely on this information to be triggered after successful leader election i.e. stable term change. Fixes: redpanda-data#16142 Signed-off-by: Michal Maslanka <michal@redpanda.com>
Leadership notification is triggered only on successful leader election. We do not need to pass the optional as `leader_id` is always present. Signed-off-by: Michal Maslanka <michal@redpanda.com>
Under which scenarios does that happen? When we vote but the current leader wins the election? |
it may happen when leadership transfer to desired node fails f.e. transfer request from 2->1 fails and 2 is elected as the leader once again |
I see, so it should still be relatively rare. |
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/45457#018df105-b431-41cc-9723-5da0fba0fb3c |
/backport v23.3.x |
/backport v23.2.x |
Failed to create a backport PR to v23.2.x branch. I tried:
|
When term changes but leader stays on the same we should still trigger the leadership notification.
Downstream components like
leadership_balancer
rely on this information to be triggered after successful leader election i.e. stable term change.Fixes: #16142
Backports Required
Release Notes