+1 (binding)

-Lari

On 2025/02/11 06:37:59 Tao Jiuming wrote:
> Hi all,
> 
> I open PIP-404 to introduce per ledger properties, which will add a
> `properties` field to `LedgerInfo` to store extra properties for every
> `Ledger`.
> 
> # Background knowledge
> As we don't have a secondary index on the Bookkeeper, so we can't query
> entries by message metadata efficiently.
> The `ManagedCursor` provides a method `asyncFindNewestMatching` to find the
> newest entry that matches the given
> predicate by binary search(See `OpFindNewest.java`).
> In https://github.com/apache/pulsar/pull/22792, we optimized `seeking by
> timestamp` by calculating
> the range of ledgers that may contain the target timestamp by
> `LedgerInfo#timestamp` and we don't need to scan all
> ledgers.
> However, when we enabled `AppendIndexMetadataInterceptor` and we want to
> query entries by `BrokerEntryMetadata#index`,
> there is no more efficient way,
> we have to scan all ledgers by binary search to find the target entry.
> 
> # Motivation
> Introduce per-ledger properties and we can store the extra per-ledger
> properties in the `LedgerInfo`,
> so we can query entries by `incremental index` more efficiently, say,
> `BrokerEntryMetadata#index`.
> 
> PR link: https://github.com/apache/pulsar/pull/23837/files
> 
> Please help review the PIP and vote.
> 
> Thanks,
> Tao Jiuming(dao-jun)
> 

Reply via email to