-
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] Immediately tombstone Deleted and Free state bundles #22743
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
heesung-sn
changed the title
[fix][broker] Immediately tombstone Deleted and Free state bundles and enable MultiPhaseBundleUnload for non-transfer unloading
[fix][broker] Immediately tombstone Deleted and Free state bundles
May 19, 2024
Demogorgon314
approved these changes
May 21, 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.
LGTM.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #22743 +/- ##
============================================
- Coverage 73.57% 73.20% -0.38%
+ Complexity 32624 32577 -47
============================================
Files 1877 1889 +12
Lines 139502 141433 +1931
Branches 15299 15520 +221
============================================
+ Hits 102638 103531 +893
- Misses 28908 29905 +997
- Partials 7956 7997 +41
Flags with carried forward coverage won't be shown. Click here to find out more.
|
BewareMyPower
added a commit
to BewareMyPower/pulsar
that referenced
this pull request
Jun 6, 2024
…t channel ### Motivation NPE will happen in `UnloadManager#handleEvent` after apache#22743. It's because the `Init` state is always associated with a null `ServiceUnitStateData`. ``` java.lang.NullPointerException: Cannot invoke "org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateData.force()" because "data" is null at org.apache.pulsar.broker.loadbalance.extensions.manager.UnloadManager.handleEvent(UnloadManager.java:204) ~[classes/:?] at org.apache.pulsar.broker.loadbalance.extensions.channel.StateChangeListeners.lambda$notify$3(StateChangeListeners.java:74) ~[classes/:?] at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807) ~[?:?] at org.apache.pulsar.broker.loadbalance.extensions.channel.StateChangeListeners.notify(StateChangeListeners.java:72) ~[classes/:?] at org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateChannelImpl.handleInitEvent(ServiceUnitStateChannelImpl.java:902) ~[classes/:?] at org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateChannelImpl.handle(ServiceUnitStateChannelImpl.java:715) ~[classes/:?] ``` ### Modifications In `UnloadManager#handleEvent`, assume `data` is null and call `complete` directly. Fix `UnloadManagerTest`, which passes a non-null `ServiceUnitStateData` and `Init` to `handleEvent`.
4 tasks
heesung-sn
added a commit
to heesung-sn/pulsar
that referenced
this pull request
Jun 26, 2024
heesung-sn
added a commit
to heesung-sn/pulsar
that referenced
this pull request
Jun 26, 2024
…pache#22743) (cherry picked from commit 949260f)
heesung-sn
added a commit
to heesung-sn/pulsar
that referenced
this pull request
Jun 26, 2024
…pache#22743) (cherry picked from commit 949260f) (cherry picked from commit d982d3b)
heesung-sn
added a commit
to heesung-sn/pulsar
that referenced
this pull request
Jun 26, 2024
…pache#22743) (cherry picked from commit 949260f)
heesung-sn
added a commit
to heesung-sn/pulsar
that referenced
this pull request
Jun 26, 2024
…pache#22743) (cherry picked from commit 949260f)
heesung-sn
added a commit
to heesung-sn/pulsar
that referenced
this pull request
Jun 26, 2024
…pache#22743) (cherry picked from commit 949260f)
heesung-sn
added a commit
to heesung-sn/pulsar
that referenced
this pull request
Jun 26, 2024
…pache#22743) (cherry picked from commit 949260f) (cherry picked from commit d982d3b)
heesung-sn
added a commit
to heesung-sn/pulsar
that referenced
this pull request
Jun 27, 2024
…pache#22743) (cherry picked from commit 949260f) (cherry picked from commit d982d3b)
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jun 27, 2024
…pache#22743) (cherry picked from commit 949260f) (cherry picked from commit d982d3b) (cherry picked from commit 44f2e98)
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jul 1, 2024
…pache#22743) (cherry picked from commit 949260f) (cherry picked from commit d982d3b) (cherry picked from commit 44f2e98)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cherry-picked/branch-3.0
cherry-picked/branch-3.2
cherry-picked/branch-3.3
doc-not-needed
Your PR changes do not impact docs
ready-to-test
release/3.0.6
release/3.2.4
release/3.3.1
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.
Motivation
Extensible Load Balancer cannot split bundles when a namespace is recreated. The old parent bundle before split (in the Deleted state) could block the next split operation until they are tombstoned by the leader monitor bundle cleanup job.
Extensible Load Balancer delays bundle cleanups when a namespace is deleted. Those deleted bundles are stuck in Free state until they are tombstoned by the leader monitor bundle cleanup job. Although this delayed tombstone was introduced for non-transfer unloading, these lingering bundles are not ideal when the namespace is deleted.
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#67