Skip to content

Conversation

@nodece
Copy link
Member

@nodece nodece commented May 8, 2024

Motivation

When the replicator rate limit value based on bytes is less than the org.apache.pulsar.broker.service.persistent.PersistentReplicator#readMaxSizeBytes, this will cause the outgoing bytes to exceed the limit value.

The goal is to make outgoing bytes as close to the rate limit value as possible.

Modifications

  • org.apache.pulsar.broker.service.persistent.PersistentReplicator#getAvailablePermits returns the available messages and bytes, and then reads the entries based on that.

Verifying this change

The test has been added.

Documentation

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

@nodece nodece requested a review from lhotari May 8, 2024 10:38
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label May 8, 2024
@nodece
Copy link
Member Author

nodece commented May 13, 2024

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

codecov-commenter commented May 13, 2024

Codecov Report

Attention: Patch coverage is 65.38462% with 9 lines in your changes missing coverage. Please review.

Project coverage is 73.43%. Comparing base (bbc6224) to head (51c5c0d).
Report is 1221 commits behind head on master.

Files with missing lines Patch % Lines
...roker/service/persistent/PersistentReplicator.java 65.38% 6 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #22674      +/-   ##
============================================
- Coverage     73.57%   73.43%   -0.14%     
- Complexity    32624    33275     +651     
============================================
  Files          1877     1907      +30     
  Lines        139502   142961    +3459     
  Branches      15299    15582     +283     
============================================
+ Hits         102638   104985    +2347     
- Misses        28908    29945    +1037     
- Partials       7956     8031      +75     
Flag Coverage Δ
inttests 27.74% <42.30%> (+3.16%) ⬆️
systests 24.75% <0.00%> (+0.43%) ⬆️
unittests 72.45% <65.38%> (-0.39%) ⬇️

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

Files with missing lines Coverage Δ
...roker/service/persistent/PersistentReplicator.java 68.89% <65.38%> (+0.02%) ⬆️

... and 482 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.

@nodece nodece force-pushed the limit-replication-rate-based-on-bytes branch from a3277c3 to d4c089b Compare June 13, 2024 08:27
@nodece
Copy link
Member Author

nodece commented Jun 14, 2024

/pulsarbot rerun-failure-checks

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
@nodece nodece force-pushed the limit-replication-rate-based-on-bytes branch from d4c089b to 51c5c0d Compare June 28, 2024 03:54
@nodece nodece merged commit 7f4c0c5 into apache:master Jun 28, 2024
hanmz pushed a commit to hanmz/pulsar that referenced this pull request Feb 12, 2025
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
poorbarcode pushed a commit that referenced this pull request Jul 7, 2025
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 7f4c0c5)
poorbarcode pushed a commit that referenced this pull request Jul 7, 2025
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 7f4c0c5)
priyanshu-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 22, 2025
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 7f4c0c5)
(cherry picked from commit 76417d0)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 23, 2025
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 7f4c0c5)
(cherry picked from commit 76417d0)
@nodece nodece deleted the limit-replication-rate-based-on-bytes branch July 28, 2025 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants