codelipenghui opened a new pull request, #17465:
URL: https://github.com/apache/pulsar/pull/17465
Fixes #17451
### Motivation
Improve the `ManagedCursorImpl.getNumberOfEntries()` if
`isUnackedRangesOpenCacheSetEnabled=true`.
Since the `ConcurrentOpenLongPairRangeSet` has the ability to get the acked
count for each Ledger,
the `ManagedCursorImpl` can avoid iterating each range to calculate the
acked count.
### Modifications
Make the `ConcurrentOpenLongPairRangeSet` able to get acked count.
### Verifying this change
Unit test for the new method introduced in `ConcurrentOpenLongPairRangeSet`
The `getNumberOfEntries()` change is already covered by the existing test
### Documentation
Check the box below or label this PR directly.
Need to update docs?
- [x] `doc-not-needed`
(Just an improvement for the presented implementation)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]