-
Notifications
You must be signed in to change notification settings - Fork 559
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.2.x] c/topics_dispatcher: do not guesstimate leader ids #16239
Merged
piyushredpanda
merged 9 commits into
redpanda-data:v23.2.x
from
mmaslankaprv:backport-pr-15678-v23.2.x-762
Jan 24, 2024
Merged
[v23.2.x] c/topics_dispatcher: do not guesstimate leader ids #16239
piyushredpanda
merged 9 commits into
redpanda-data:v23.2.x
from
mmaslankaprv:backport-pr-15678-v23.2.x-762
Jan 24, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updating leadership metadata before the topic is ready to serve traffic is not desired. It prevents waiting for leader to be reported by raft group when it is actually ready. Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 3e86234)
Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 8f81843)
Instead of returning `-1` indicating that there is an ongoing leader election we return randomly selected node as a partition leader. This is much less interrupting for the client as it simply forces it to refresh metadata. Some clients do not tolerate `-1` returned from Metadata handler and simply stop working. Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 86d583b)
I guess we should also backport #15981 along with this one |
ztlpn
reviewed
Jan 23, 2024
Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 763c0ac)
Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 5bf2a27)
The metadata dissemination test must account for exponential backoff which may be longer than used 10 seconds timeout. Now as we do not update leaders table after topic create command is applied we need to wait for the request to be delivered to joining node. Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit fea4f6a)
The consumer group recovery test doesn't do any validation if offset listing was successful. Disabling leader balancer will make the test more stable before we introduce validation in recovery tool (now the tool assumes that user is going to review offsets listing). Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 3b2eac5)
Wait for at least some of the messages to be successfully written to topic before starting consumers to prevent them trying to read empty partition. Signed-off-by: Michal Maslanka <michal@redpanda.com> (cherry picked from commit 6823527)
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)
mmaslankaprv
force-pushed
the
backport-pr-15678-v23.2.x-762
branch
from
January 24, 2024 08:55
f4ffa61
to
5f13a37
Compare
ztlpn
approved these changes
Jan 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of PR #15678
Backport of PR #15981
Fixes: #16237