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 13:06:59 UTC
[PR] [improve][ml] Build cached read results without an intermediate collection [pulsar]
lhotari opened a new pull request, #26529:
URL: https://github.com/apache/pulsar/pull/26529
### Motivation
Range cache reads first collect retained cache entries and then copy them into the final read-result list. This allocates an intermediate collection and traverses the entries twice.
### Modifications
Add an ordered range visitor with a retained reference during each callback and guaranteed release afterward. Build the final sparse result directly, allocating its list only on the first cache hit. Preserve missing-range storage reads and cache-hit accounting. Add visitor ordering, reference ownership and exceptional-callback tests plus a range-read benchmark.
### Verifying this change
Historical 1,000-entry JMH reduced allocation from about 29,873 to 129 B and time from 29,033 to 23,316 ns; a fanout profile observed 7.5% lower broker sampled allocation. A small partial-hit case cost about 116 ns more. These are prior experimental results; no new full-run throughput claim is made. Reference ownership and concurrent eviction remain relevant review areas.
Local extraction validation passed: `spotlessCheck checkstyleMain checkstyleTest`, benchmark compilation, and 43 scoped tests with no failures or skips: org.apache.bookkeeper.mledger.impl.InflightReadsLimiterIntegrationTest (14), org.apache.bookkeeper.mledger.impl.cache.RangeCacheTest (14), org.apache.bookkeeper.mledger.impl.cache.RangeEntryCacheImplTest (15). 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] Build cached read results without an intermediate collection [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #26529:
URL: https://github.com/apache/pulsar/pull/26529
--
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