-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[improve][client] RawReader support pause and resume #24597
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
Merged
hangc0276
merged 4 commits into
apache:master
from
hangc0276:chenhang/rawreader_support_pause
Aug 5, 2025
Merged
[improve][client] RawReader support pause and resume #24597
hangc0276
merged 4 commits into
apache:master
from
hangc0276:chenhang/rawreader_support_pause
Aug 5, 2025
Conversation
This file contains hidden or 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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #24597 +/- ##
============================================
- Coverage 74.47% 74.34% -0.13%
+ Complexity 32735 32680 -55
============================================
Files 1880 1880
Lines 146433 146437 +4
Branches 16789 16789
============================================
- Hits 109055 108873 -182
- Misses 28767 28917 +150
- Partials 8611 8647 +36
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
zymap
reviewed
Aug 4, 2025
pulsar-broker/src/main/java/org/apache/pulsar/client/api/RawReader.java
Outdated
Show resolved
Hide resolved
poorbarcode
approved these changes
Aug 4, 2025
lhotari
approved these changes
Aug 4, 2025
Member
|
/pulsarbot rerun-failure-checks |
hangc0276
added a commit
that referenced
this pull request
Aug 5, 2025
(cherry picked from commit 7274ee1)
gaozhangmin
pushed a commit
to gaozhangmin/pulsar
that referenced
this pull request
Aug 13, 2025
poorbarcode
pushed a commit
to poorbarcode/pulsar
that referenced
this pull request
Aug 14, 2025
KannarFr
pushed a commit
to CleverCloud/pulsar
that referenced
this pull request
Sep 22, 2025
walkinggo
pushed a commit
to walkinggo/pulsar
that referenced
this pull request
Oct 8, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/client
cherry-picked/branch-4.0
doc-not-needed
Your PR changes do not impact docs
ready-to-test
release/4.0.7
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.
Fixes #xyz
Main Issue: #xyz
PIP: #xyz
Motivation
RawReader is a wrapper for Consumer, but it doesn't expose the pause and resume interface. We have a RawReader pool that cached a lot of RawReaders, and when the Pulsar broker restarts or the topic is unloaded, the Pulsar client will reconnect to the broker and prefetch messages from the Pulsar broker, making the RawReader pool run out of memory and bring heavy on the Pulsar broker especially when the data has been offloaded to the tiered storage.
Modifications
Expose the pause and resume interface for RawReader to avoid prefetch messages when Pulsar broker restart or topic unload.
Verifying this change
(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:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: