You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2026/09/10 12:54:54 UTC
[PR] [improve][ml] Share read-permit release callbacks within a batch [pulsar]
lhotari opened a new pull request, #26523:
URL: https://github.com/apache/pulsar/pull/26523
### Motivation
A cached read batch currently creates an equivalent release callback for every entry, although all callbacks share the same remaining-entry counter and permit handle.
### Modifications
Create one callback per read batch and attach it to every entry. Keep atomic remaining-entry accounting and release permits only after the final entry is deallocated. Add a test retaining one entry reference while the other entries are released and a focused callback-allocation benchmark.
### Verifying this change
Historical JMH removed approximately 40 B per entry in large batches; a long fanout profile reduced broker sampled allocation by 2.3%, with CPU/rate flat. These are prior experimental results, not new measurements of this extraction.
Local extraction validation passed: `spotlessCheck checkstyleMain checkstyleTest`, benchmark compilation, and 30 scoped tests with no failures or skips: org.apache.bookkeeper.mledger.impl.InflightReadsLimiterIntegrationTest (14), org.apache.bookkeeper.mledger.impl.cache.RangeEntryCacheImplTest (16). Retries were disabled; Gradle ran with `--max-workers=2 --no-parallel`.
- [ ] Make sure that the change passes the CI checks.
### Does this pull request potentially affect one of the following parts:
- [ ] 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][ml] Share read-permit release callbacks within a batch [pulsar]
Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat merged PR #26523:
URL: https://github.com/apache/pulsar/pull/26523
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org