Shawyeok commented on PR #25200:
URL: https://github.com/apache/pulsar/pull/25200#issuecomment-3854302051

   > I'm wondering if the fix in this PR is reasonable: 
https://github.com/apache/pulsar/pull/25117. The goal is to keep the ledger 
data and the mark-deleted position consistent, thereby eliminating similar 
warning logs.
   > 
   > 
   
   @oneby-wang 
   
   IMO, we should only change the mark-deleted position of a cursor when 
there's an actual user acknowledgment. Here's why:
   
   - If the mark-deleted position changes from 1000:-1 to 1100:-1 just to stay 
consistent with the managed ledger's ledger list, we lose visibility into 
whether any real acknowledgments occurred during that period. Keeping the 
mark-deleted position as-is preserves that information — we can tell that no 
messages were actually acknowledged.
   
   - I don't see a clear benefit from enforcing this consistency. The managed 
ledger's ledger list is a `ConcurrentSkipListMap`, which handles lookups for 
the lowest bound greater than the mark-deleted position just fine.


-- 
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]

Reply via email to