• menwen's avatar
    Fix if consumer is created as a side effect without notify and dirty++ (#9263) · 82c3158a
    menwen authored
    Fixes:
    - When a consumer is created as a side effect, redis didn't issue a keyspace notification,
      nor incremented the server.dirty (affects periodic snapshots).
      this was a bug in XREADGROUP, XCLAIM, and XAUTOCLAIM.
    - When attempting to delete a non-existent consumer, don't issue a keyspace notification
      and don't increment server.dirty
      this was a bug in XGROUP DELCONSUMER
    
    Other changes:
    - Changed streamLookupConsumer() to always only do lookup consumer (never do implicit creation),
      Its last seen time is updated unless the SLC_NO_REFRESH flag is specified.
    - Added streamCreateConsumer() to create a new consumer. When the creation is successful,
      it will notify and dirty++ unless the SCC_NO_NOTIFY or SCC_NO_DIRTIFY flags is specified.
    - Changed streamDelConsumer() to always only do delete consumer.
    - Added keyspace notifications tests about stream events.
    82c3158a
pubsub.tcl 13.4 KB