Skip to content
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

[v23.3.x] k/metadata: guesstimate leader when information is not yet present #16492

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #15981
Fixes: #16490, Fixes: #16491,

When partition is first created in Redpanda some of the cluster nodes
which are not hosting partition replicas may not yet have leadership
metadata. In this case Redpanda still has to return partition metadata.
In order not to disturb the client (returning -1 as a leader id may
cause some clients to stop) Redpanda has to return a leader id. If the
information is not present we will always return the first node from
replica set in leader epoch equal to 0. This way client will either
communicate with the actual leader or issue a metadata request to other
node that may contain up to date information.

Fixes: redpanda-data#15949

Signed-off-by: Michal Maslanka <michal@redpanda.com>
(cherry picked from commit 7a60b75)
@vbotbuildovich vbotbuildovich added this to the v23.3.x-next milestone Feb 6, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v23.3.x] k/metadata: guesstimate leader when information is not yet present
3 participants