-
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
[improve][broker] PIP-307: Add feature flag config option #21866
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
reviewed
Jan 9, 2024
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java
Outdated
Show resolved
Hide resolved
...ava/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java
Outdated
Show resolved
Hide resolved
heesung-sn
reviewed
Jan 10, 2024
...ava/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java
Outdated
Show resolved
Hide resolved
heesung-sn
reviewed
Jan 10, 2024
...ava/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java
Outdated
Show resolved
Hide resolved
heesung-sn
approved these changes
Jan 10, 2024
Demogorgon314
approved these changes
Jan 11, 2024
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #21866 +/- ##
============================================
- Coverage 73.59% 73.59% -0.01%
- Complexity 32323 32340 +17
============================================
Files 1858 1859 +1
Lines 138174 138291 +117
Branches 15148 15161 +13
============================================
+ Hits 101696 101776 +80
- Misses 28608 28626 +18
- Partials 7870 7889 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in 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.
PIP: PIP-307
Motivation
This PR adds a non-dynamic option
loadBalancerMultiPhaseBundleUnload
that allows administrators to enable/disable the graceful producer/consumer shutdown upon bundle unloading (PIP-307). Without this, the only means to disable the new mechanism would be disabling the new Extensible Load Manager altogether, which might otherwise work as expected.Modifications
Adds configuration option
loadBalancerMultiPhaseBundleUnload
with the default value set to true, enabling the mechanism described in PIP-307 out-of-the-box. With the flag disabled, the clients are disconnected immediately on the source broker upon reaching theRELEASE
state in the service channel. No lookup information is forwarded to the clients, causing them to fall back on the old behavior, wherein they have to issue lookup calls to locate the new broker serving the topic.Verifying this change
This change added tests and can be verified as follows:
org.apache.pulsar.broker.loadbalance.extensions.ExtensibleLoadManagerImplTest#testOptimizeUnloadDisable
that verifies client lookups occur on both producers and consumers when the flag is set to disabledDoes 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: dragosvictor#5