-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[fix][broker] Fix the bug that elected leader thinks it's a follower #23138
Merged
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
lhotari
approved these changes
Aug 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch and good work @heesung-sn! LGTM
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #23138 +/- ##
============================================
+ Coverage 73.57% 74.56% +0.99%
- Complexity 32624 33576 +952
============================================
Files 1877 1919 +42
Lines 139502 144174 +4672
Branches 15299 15758 +459
============================================
+ Hits 102638 107504 +4866
+ Misses 28908 28436 -472
- Partials 7956 8234 +278
Flags with carried forward coverage won't be shown. Click here to find out more.
|
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Aug 9, 2024
…pache#23138) (cherry picked from commit 3560ddb) (cherry picked from commit 90d17e8)
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Aug 12, 2024
…pache#23138) (cherry picked from commit 3560ddb) (cherry picked from commit 90d17e8)
Denovo1998
pushed a commit
to Denovo1998/pulsar
that referenced
this pull request
Aug 17, 2024
nodece
pushed a commit
to ascentstream/pulsar
that referenced
this pull request
Aug 28, 2024
…pache#23138) (cherry picked from commit 3560ddb)
grssam
pushed a commit
to grssam/pulsar
that referenced
this pull request
Sep 4, 2024
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jan 16, 2025
…pache#23138) (cherry picked from commit 3560ddb)
4 tasks
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jan 16, 2025
…pache#23138) (cherry picked from commit 3560ddb)
hanmz
pushed a commit
to hanmz/pulsar
that referenced
this pull request
Feb 12, 2025
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
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.
Fixes #23125
Motivation
As reported in the issue, #23125, we have seen a case where the elected leader indefinitely thinks it's a follower. As a result, this issue can block load shedding(run by the leader) and cause broker load imbalance.
Additionally, I think the broker leadership should be checked more aggressively upon zk re-connection as well because znode deletion watch events could be missed while reconnected[1]
Refs:
[1] https://zookeeper.apache.org/doc/current/zookeeperProgrammers.html#ch_zkWatches
Modifications
Verifying this change
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: heesung-sn#77