Please check comments on 
https://github.com/apache/pulsar/pull/25873#pullrequestreview-4505467749 before 
proceeding.

In summary: create a separate "random read" abstraction where the instance 
which implements the interface can be created from ManagedLedger. Adding more 
methods to ManagedLedger breaks the abstraction and makes it worse. I'm guilty 
of adding asyncRead while removing ManagedLedgerImpl references from Pulsar for 
allowing 3rd party ManagedLedger implementations. It was a mistake and the 
existing method should be moved to the "random read" interface as well. There 
are a few concerns to address for batch reads which don't apply to the single 
read. Please check the details in the comment on the PIP PR.

-Lari

On 2026/06/08 05:46:15 Tao Jiuming wrote:
> Hi Pulsar community, I'd like to VOTE PIP-480: Add readEntries method to
> ManagedLedger.
> 
> Currently we have
> ```java
> void asyncReadEntry(Position position, AsyncCallbacks.ReadEntryCallback
> callback, Object ctx)
> ```
> In ManagedLedger to read a single entry, but we don't have a method to read
> multi-entries form Bookkeeper.
> 
> This PIP adds new method to ManagedLedger to provide the ability to read
> multi-entries without creating a Cursor.
> PR: https://github.com/apache/pulsar/pull/25873
>   Thanks, Tao Jiuming
> 

Reply via email to