-
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] Cancel the loadShedding task when closing pulsar service #17632
Merged
Technoboy-
merged 6 commits into
apache:master
from
gaoran10:improve-shutdown-load-shedding-task
Sep 15, 2022
Merged
[improve][broker] Cancel the loadShedding task when closing pulsar service #17632
Technoboy-
merged 6 commits into
apache:master
from
gaoran10:improve-shutdown-load-shedding-task
Sep 15, 2022
+97
−10
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
gaoran10
requested review from
eolivelli,
Jason918,
lhotari,
codelipenghui,
congbobo184,
mattisonchao,
Technoboy- and
zymap
September 14, 2022 05:02
gaoran10
changed the title
[improve] Cancel the loadShedding task when closing pulsar service
[improve][broker] Cancel the loadShedding task when closing pulsar service
Sep 14, 2022
poorbarcode
approved these changes
Sep 14, 2022
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 work.
I left a suggestion
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LoadSheddingTask.java
Show resolved
Hide resolved
congbobo184
approved these changes
Sep 14, 2022
pulsar-broker/src/test/java/org/apache/pulsar/broker/PulsarServiceCloseTest.java
Show resolved
Hide resolved
codelipenghui
added
release/2.10.2
release/blocker
Indicate the PR or issue that should block the release until it gets resolved
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
area/broker
labels
Sep 14, 2022
pulsar-broker/src/test/java/org/apache/pulsar/broker/PulsarServiceCloseTest.java
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/broker/PulsarServiceCloseTest.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/test/java/org/apache/pulsar/broker/PulsarServiceCloseTest.java
Outdated
Show resolved
Hide resolved
Technoboy-
approved these changes
Sep 15, 2022
coderzc
approved these changes
Sep 15, 2022
Technoboy-
pushed a commit
that referenced
this pull request
Sep 15, 2022
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Sep 20, 2022
…rvice (apache#17632) (cherry picked from commit cbbcd41) (cherry picked from commit 9a1f483)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/broker
cherry-picked/branch-2.10
doc-not-needed
Your PR changes do not impact docs
release/blocker
Indicate the PR or issue that should block the release until it gets resolved
release/2.10.2
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
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
The PR #16408 supported loadBalancerSheddingIntervalMinutes dynamic configuration, but the scheduled load-shedding task may block pulsar service close operation, the pulsar service need to wait until the scheduled load-shedding task executed or reach broker shutdown timeout. If the load-shedding task interval time and broker shutdown timeout are long, the pulsar service close operation will waste a lot of time.
Modifications
Cancel the scheduled task when closing the pulsar service.
Verifying this change
Add a test to verify the pulsar service could be closed gracefully in time.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc-required
(Your PR needs to update docs and you will update later)
doc-not-needed
(Please explain why)
doc
(Your PR contains doc changes)
doc-complete
(Docs have been already added)