void-ptr974 commented on PR #26030: URL: https://github.com/apache/pulsar/pull/26030#issuecomment-4701363053
Follow-up plan for context: This PR intentionally keeps the current nested `TreeMap` structure and only changes the stored pending-ack value representation plus the consumer hot-path accessors. The goal is to make this step reviewable on its own: packed value semantics, signed sticky-key hash handling, zero remaining-count handling, and no behavior change for ledger/entry ordering. The next steps are planned separately: 1. #26028 adds the local primitive `Long2LongOpenHashMap` utility without changing broker behavior. 2. A follow-up PR will use that primitive map inside `PendingAcksMap` for the per-ledger entry map. That step removes the boxed inner-map key/value overhead and will be based on this packed-value shape once it is stable. 3. Another follow-up PR will add the BitSet prefix index for same-ledger `removeAllUpTo` cleanup. The primitive map improves exact-key operations, but it does not provide the old `TreeMap.headMap(...).clear()` prefix path; the BitSet index is meant to recover that practical cleanup performance while remaining only a performance index. The O(1) `size()` work is tracked separately in #26019, so this PR does not include any size-accounting changes. -- 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]
