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: a consumer created by an XREADGROUP that timed out is missing after AOF replay #654
Found while reviewing #644; master and 1.2.1 both have it.
In Redis, XREADGROUP GROUP g alice BLOCK ... STREAMS s > creates consumer alice in group g even when the read times out with nothing to return, and the consumer survives a restart. In KiviDB the consumer exists until the restart, but after the AOF is replayed it is gone.
Repro (AOF on):
XGROUP CREATE s g $ MKSTREAM
XREADGROUP GROUP g alice BLOCK 100 STREAMS s > # -> nil after 100 ms
XINFO CONSUMERS s g # -> alice
# restart (or DEBUG RELOAD with AOF / kill -9 and start)
XINFO CONSUMERS s g # -> empty, expected alice
Likely cause: the blocking path that times out creates the consumer but nothing is propagated to the AOF/replicas for it. Redis propagates an XGROUP CREATECONSUMER in that case. The fix is probably to propagate that, and a test in tests/streams.rs that replays the AOF.
Good first issue: small, self-contained, and Redis's behaviour is the spec.
Activity
fix(streams): propagate the consumer an XREADGROUP creates before it …