You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Streams: the IDMP duplicate counter (iids-duplicates) is not restored by AOF replay #655
Found while reviewing #644; master and 1.2.1 both have it.
With idempotent producers (XADD ... IDMP), XINFO STREAM reports how many duplicates were dropped (iids-duplicates). The counter is right while the server runs, but after a restart that replays the AOF it starts over (snapshots keep it).
Repro (AOF on, no snapshot in between):
XCFGSET s IDMP-DURATION 100 IDMP-MAXSIZE 100 # or however the stream is set up for IDMP
XADD s IDMP p1 id1 * f v
XADD s IDMP p1 id1 * f v # a duplicate: dropped
XINFO STREAM s # iids-duplicates 1
# restart, AOF replayed
XINFO STREAM s # iids-duplicates 0, expected 1
Check what Redis 8.10 does here first (whether the duplicate XADD reaches its AOF, or the counter is otherwise kept), and match it. Add a test that replays the AOF.
Good first issue: the stream code is small and well tested; tests/stream_changes.rs has examples.
Activity
IDMP duplicates are counted again when the AOF is replayed (kividbio#655
Changelog: upgrade replicas before their master for the kividbio#655 fix
fix(streams): propagate idempotent XADD duplicates so replicas and AO…