nodece opened a new pull request, #25624:
URL: https://github.com/apache/pulsar/pull/25624

   Fix #25613
   
   ### Motivation
   
   PR #25592 added `Dispatcher#markDeletePositionMoveForward()` to clean up 
pending acks and redelivery state when cursors advance via subscription-level 
APIs (skip, expiry, clear-backlog).
   
   However, `BacklogQuotaManager` bypasses these APIs and directly updates 
`ManagedCursor`, so the hook is not triggered in two eviction paths:
   
   * Size eviction: `ManagedCursor.skipEntries`
   * Time eviction (non-precise): `ManagedCursor.markDelete`
   
   This leads to stale state in `Key_Shared` subscriptions:
   
   * `pendingAcks` not cleaned up
   * `unackedMessages` drift
   
   
   ### Modifications
   
   - BacklogQuotaManager
     - Add helper to trigger `Dispatcher#markDeletePositionMoveForward`
     - Invoke after cursor advancement in:
        - size eviction
        - time eviction (non-precise)
      - Extract eviction math into shared methods:
        - `computeEvictionTarget`
        - `computeEntriesToEvict`


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