Skip to content
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

Conversation

gaoran10
Copy link
Contributor

@gaoran10 gaoran10 commented Sep 14, 2022

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

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • Anything that affects deployment

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)

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 14, 2022
@gaoran10 gaoran10 self-assigned this Sep 14, 2022
@gaoran10 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
Copy link
Contributor

@poorbarcode poorbarcode left a 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

@codelipenghui codelipenghui added this to the 2.11.0 milestone Sep 14, 2022
@codelipenghui 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
@Technoboy- Technoboy- merged commit cbbcd41 into apache:master Sep 15, 2022
Jason918 pushed a commit that referenced this pull request Sep 17, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants