kirito632 commented on PR #3504:
URL: https://github.com/apache/kvrocks/pull/3504#issuecomment-4585445595

   Note on ACKED semantics:
   
     The Redis documentation states that ACKED only deletes entries that were 
"read and
     acknowledged by all consumer groups", but it does not explicitly describe 
how
     `last_delivered_id` interacts with PEL state when determining whether an 
entry can be
     deleted.
   
     I verified Redis 8.2 behavior with several scenarios:
   
     * A consumer group created with `$` does not block deletion of entries 
that predate its
     delivery cursor, even if it never acknowledged those entries.
     * A consumer group whose `last_delivered_id` is still behind the entry 
does block deletion,
     even when no PEL entry exists.
     * A consumer group that has already delivered the entry but still has a 
PEL entry for it
     also blocks deletion.
     * Once the PEL entry is acknowledged and removed, the same group no longer 
blocks deletion,
     even if its `last_delivered_id` is far beyond the entry.
   
     These results suggest that ACKED is not determined solely by PEL 
membership. Redis 8.2
     appears to treat the following conditions as independently preventing 
deletion:
   
     * The group has not yet reached the entry (`entry_id > last_delivered_id`).
     * The group still has a pending reference, meaning a PEL entry exists for 
the entry.
   
     The additional `last_delivered_id` check is intended to preserve this 
Redis 8.2 behavior by
     distinguishing two no-PEL cases: a group that has not reached the entry 
yet must still
     block deletion, while a group that was created past the entry, for example 
using `$`,
     should not block deletion.


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