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:00:16 UTC
[PR] [improve][ml] Share immutable publish positions with cached entries [pulsar]
lhotari opened a new pull request, #26526:
URL: https://github.com/apache/pulsar/pull/26526
### Motivation
Cached publish completion creates a position for the cache entry and then another identical immutable position for the last-confirmed state and add callback.
### Modifications
Create the completion position before cache insertion and pass it to the existing EntryImpl.create overload taking Position. Reuse the immutable instance for the cache and completion state; preserve uncached, shadow-ledger and rollover paths. Include a pooled-entry position-sharing benchmark and Netty-thread executor.
### Verifying this change
Historical pooled-entry JMH reduced cached-path allocation from 64 to 32 B, with CPU effectively flat; uncached allocation remained 32 B. The targeted position allocation disappeared in the full profile, but aggregate broker allocation/CPU were flat. No aggregate gain is claimed. Run the benchmark fork with -Djmh.executor=CUSTOM -Djmh.executor.class=org.apache.pulsar.client.impl.FastThreadLocalBenchmarkExecutor; its runtime guard verifies appropriate threads. No new performance experiments were run for extraction.
Local extraction validation passed: `spotlessCheck checkstyleMain checkstyleTest`, benchmark compilation, and 19 scoped tests with no failures or skips: org.apache.bookkeeper.mledger.impl.EntryImplTest (10), org.apache.bookkeeper.mledger.impl.ManagedLedgerTest (8), org.apache.bookkeeper.mledger.impl.ShadowManagedLedgerImplTest (1). 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 immutable publish positions with cached entries [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #26526:
URL: https://github.com/apache/pulsar/pull/26526
--
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