-
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] Fixed the ExtensibleLoadManagerImpl internal system getTopic failure when the leadership changes #21764
[fix][broker] Fixed the ExtensibleLoadManagerImpl internal system getTopic failure when the leadership changes #21764
Conversation
…ic getTopic failure when the leadership changes
LGTM! |
...src/main/java/org/apache/pulsar/broker/loadbalance/extensions/ExtensibleLoadManagerImpl.java
Outdated
Show resolved
Hide resolved
...n/java/org/apache/pulsar/broker/loadbalance/extensions/store/TableViewLoadDataStoreImpl.java
Outdated
Show resolved
Hide resolved
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
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #21764 +/- ##
============================================
+ Coverage 72.94% 73.43% +0.49%
- Complexity 32579 32786 +207
============================================
Files 1897 1897
Lines 140627 140647 +20
Branches 15486 15489 +3
============================================
+ Hits 102581 103288 +707
+ Misses 29974 29285 -689
- Partials 8072 8074 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@heesung-sn Can you help cherry-pick this PR to |
…Topic failure when the leadership changes (apache#21764)
Raised a cherry-pick PR here. |
…Topic failure when the leadership changes (apache#21764)
…Topic failure when the leadership changes (apache#21764)
…Topic failure when the leadership changes apache#21764 (apache#21801)
…Topic failure when the leadership changes apache#21764 (apache#21801) (cherry picked from commit 39b69a3)
…Topic failure when the leadership changes apache#21764 (apache#21801) (cherry picked from commit 39b69a3)
Motivation
After this fix, #21729, we need to recreate the non-persistent internal system topics when the leadership changes because we disabled the auto-creation of the non-persistent internal system topics.
Also, the non-persistent consumers and producers might be in a closed state, as they could receive
TopicNotFoundException
when the new leader broker has not created the internal topics yet. To cover this case, we need to update the leader and follower role change logic to be more idempotent.Modifications
Verifying this change
ExtensibleLoadManager.testIsolationPolicy test was flaky because of the this issue.
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#55