Skip to content

Conversation

@congbobo184
Copy link
Contributor

Motivation

don't do load shedding when metadata service not available.

if unload bundle when metadata service not available, these topics which in this bundle can't recover the current ledger and send read again

Modifications

  1. check metadata service state when do load shedding task
  2. do not interrupt the task are doing in the same time

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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 threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jul 16, 2024
@congbobo184 congbobo184 self-assigned this Jul 16, 2024
@congbobo184 congbobo184 added this to the 3.4.0 milestone Jul 16, 2024
@congbobo184 congbobo184 changed the title [improve][broker] don't do load shedding when metadata service not av… [improve][broker] don't do load shedding when metadata service not available Jul 16, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.48%. Comparing base (bbc6224) to head (2bc63f2).
⚠️ Report is 1412 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23040      +/-   ##
============================================
- Coverage     73.57%   73.48%   -0.10%     
- Complexity    32624    33196     +572     
============================================
  Files          1877     1915      +38     
  Lines        139502   143948    +4446     
  Branches      15299    15727     +428     
============================================
+ Hits         102638   105773    +3135     
- Misses        28908    30071    +1163     
- Partials       7956     8104     +148     
Flag Coverage Δ
inttests 27.85% <85.71%> (+3.27%) ⬆️
systests 24.78% <57.14%> (+0.45%) ⬆️
unittests 72.52% <100.00%> (-0.32%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...n/java/org/apache/pulsar/broker/PulsarService.java 83.47% <100.00%> (+1.10%) ⬆️
...he/pulsar/broker/loadbalance/LoadSheddingTask.java 76.92% <100.00%> (+4.19%) ⬆️

... and 497 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@congbobo184 congbobo184 force-pushed the improve/loadbalance/metadata_service_not_available_dont_do_load_shedding branch from 78b0a99 to 243aa81 Compare July 22, 2024 03:37
…/metadata_service_not_available_dont_do_load_shedding
@congbobo184 congbobo184 merged commit 3ed37af into apache:master Jul 22, 2024
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
…ailable (apache#23040)

### Motivation

don't do load shedding when metadata service not available.

if unload bundle when metadata service not available, these topics which in this bundle can't recover the current ledger and send read again
### Modifications

1. check metadata service state when do load shedding task
2. do not interrupt the task are doing in the same time
congbobo184 pushed a commit that referenced this pull request Oct 14, 2025
…vice is available again (#24838)

Motivation
After PR: #23040, if the metadata service is unavailable and then becomes available again, the LoadSheddingTask will not run again.

Modifications
Ensure LoadSheddingTask is scheduled after metadata service is available again by moving the isMetadataServiceAvailable check to the try block.
lhotari pushed a commit that referenced this pull request Oct 14, 2025
…vice is available again (#24838)

Motivation
After PR: #23040, if the metadata service is unavailable and then becomes available again, the LoadSheddingTask will not run again.

Modifications
Ensure LoadSheddingTask is scheduled after metadata service is available again by moving the isMetadataServiceAvailable check to the try block.

(cherry picked from commit 461ffd8)
lhotari pushed a commit that referenced this pull request Oct 14, 2025
…vice is available again (#24838)

Motivation
After PR: #23040, if the metadata service is unavailable and then becomes available again, the LoadSheddingTask will not run again.

Modifications
Ensure LoadSheddingTask is scheduled after metadata service is available again by moving the isMetadataServiceAvailable check to the try block.

(cherry picked from commit 461ffd8)
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Oct 15, 2025
…vice is available again (apache#24838)

Motivation
After PR: apache#23040, if the metadata service is unavailable and then becomes available again, the LoadSheddingTask will not run again.

Modifications
Ensure LoadSheddingTask is scheduled after metadata service is available again by moving the isMetadataServiceAvailable check to the try block.

(cherry picked from commit 461ffd8)
(cherry picked from commit 49d4257)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Nov 6, 2025
…vice is available again (apache#24838)

Motivation
After PR: apache#23040, if the metadata service is unavailable and then becomes available again, the LoadSheddingTask will not run again.

Modifications
Ensure LoadSheddingTask is scheduled after metadata service is available again by moving the isMetadataServiceAvailable check to the try block.

(cherry picked from commit 461ffd8)
(cherry picked from commit 49d4257)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants