-
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] Make read compacted entries support maxReadSizeBytes limitation #21065
[improve][broker] Make read compacted entries support maxReadSizeBytes limitation #21065
Conversation
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.
LGTM
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/compaction/CompactedTopicImpl.java Lines 129 to 135 in d099ac4
pulsar/pulsar-broker/src/main/java/org/apache/pulsar/compaction/StrategicTwoPhaseCompactor.java Lines 444 to 455 in d099ac4
/cc @heesung-sn @Demogorgon314 |
@coderzc Yes, this is a bug. We will fix this issue. |
@heesung-sn Should we limit the |
Yes, if the big batching matters, then we could limit the batching in both the producer and the compactor side in BSC. |
de6e18a
to
da0afc0
Compare
da0afc0
to
ce678d9
Compare
…s limitation (apache#21065) (cherry picked from commit 835e9b6)
…s limitation (apache#21065) (cherry picked from commit 835e9b6)
…s limitation (apache#21065) (cherry picked from commit 835e9b6)
…s limitation (apache#21065) (cherry picked from commit 835e9b6)
…s limitation (apache#21065) (cherry picked from commit 835e9b6)
…s limitation (apache#21065) (cherry picked from commit 835e9b6)
…s limitation (apache#21065) (cherry picked from commit 835e9b6)
…s limitation (apache#21065) (cherry picked from commit 835e9b6)
…s limitation (apache#21065) (cherry picked from commit 835e9b6)
@coderzc Can you help create a PR to cherry-pick this change to |
…xReadSizeBytes limitation (apache#21065)
Motivation
In #7060, we allow managed cursor to specify the max read batch in bytes to avoid reading too large data at a time, but reading compacted entries did not consider maxReadSizeBytes, we should make reading compacted entries also support maxReadSizeBytes limitation.
Modifications
applyMaxSizeCap
method to recalculatenumberOfEntriesToRead
before reading compacted entries.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
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: