-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][broker] fix broker may lost rack information #23331
Conversation
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.
LGTM. Thanks for the contribution @TakaHiR07
...r-metadata/src/main/java/org/apache/pulsar/metadata/bookkeeper/PulsarRegistrationClient.java
Show resolved
Hide resolved
...r-metadata/src/main/java/org/apache/pulsar/metadata/bookkeeper/PulsarRegistrationClient.java
Show resolved
Hide resolved
aa7fcdc
to
46ea59b
Compare
closing and reopening to trigger CI |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #23331 +/- ##
============================================
- Coverage 73.57% 71.06% -2.51%
- Complexity 32624 34100 +1476
============================================
Files 1877 1973 +96
Lines 139502 175999 +36497
Branches 15299 23334 +8035
============================================
+ Hits 102638 125080 +22442
- Misses 28908 41314 +12406
- Partials 7956 9605 +1649
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Co-authored-by: fanjianye <[email protected]>
Co-authored-by: fanjianye <[email protected]>
Co-authored-by: fanjianye <[email protected]>
Main Issue: #23330
Relevant issue: #23282, #23283
Motivation
Fix another issue cause broker lost rack information. There is a previous issue also cause broker lost rack information.
Modifications
This is the first potential fix, when construct bookieClient and do watchWritableBookies() to register listener, trigger each listener in writableBookiesWatchers.
This fix can ensure multiple listeners is trigger in a sync way, but it would bring duplicate trigger problem. Since watchWritableBookies() is only executed twice when bookieClient construct. I think the duplicate trigger problem is acceptable.
Alternative fix is to make BookieRackAffinityMapping#watchAvailableBookies become sync method. Change to registrationClient.watchWritableBookies(......).get() in BookieRackAffinityMapping#watchAvailableBookies. Now it is async.
Verifying this change
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: