1. 21 Jul, 2021 8 commits
    • guybe7's avatar
      Module API for current command name (#8792) · c547dff6
      guybe7 authored
      sometimes you can be very deep in the call stack, without access to argv.
      once you're there you may want your reply/log to contain the command name.
      
      (cherry picked from commit e16d3eb9)
      c547dff6
    • Huang Zhw's avatar
      Fix XTRIM or XADD with LIMIT may delete more entries than Count. (#9048) · e6df2f62
      Huang Zhw authored
      The decision to stop trimming due to LIMIT in XADD and XTRIM was after the limit was reached.
      i.e. the code was deleting **at least** that count of records (from the LIMIT argument's perspective, not the MAXLEN),
      instead of **up to** that count of records.
      see #9046
      
      (cherry picked from commit eaa7a7bb)
      e6df2f62
    • Huang Zhw's avatar
      XTRIM call streamParseAddOrTrimArgsOrReply use wrong arg xadd. (#9047) · 312ccae0
      Huang Zhw authored
      xtrimCommand call streamParseAddOrTrimArgsOrReply should use xadd==0.
      
      When the syntax is valid, it does not cause any bugs because the params of XADD is superset of XTRIM.
      Just XTRIM will not respond with error on invalid syntax. The syntax of XADD will also be accpeted by XTRIM.
      
      (cherry picked from commit 91f3689b)
      312ccae0
    • perryitay's avatar
      Fail EXEC command in case a watched key is expired (#9194) · 3f4f9b63
      perryitay authored
      
      
      There are two issues fixed in this commit: 
      1. we want to fail the EXEC command in case there is a watched key that's logically
         expired but not yet deleted by active expire or lazy expire.
      2. we saw that currently cache time is update in every `call()` (including nested calls),
         this time is being also being use for the isKeyExpired comparison, we want to update
         the cache time only in the first call (execCommand)
      Co-authored-by: default avatarOran Agra <oran@redislabs.com>
      (cherry picked from commit ac8b1df8)
      3f4f9b63
    • Huang Zhw's avatar
      Do not install a file event to send data to rewrite child when parent stop... · 5b8e3951
      Huang Zhw authored
      Do not install a file event to send data to rewrite child when parent stop sending diff to child in aof rewrite. (#8767)
      
      In aof rewrite, when parent stop sending data to child, if there is
      new rewrite data, aofChildWriteDiffData write event will be installed.
      Then this event is issued and deletes the file event without do anyting.
      This will happen over and over again until aof rewrite finish.
      
      This bug used to waste a few system calls per excessive wake-up
      (epoll_ctl and epoll_wait) per cycle, each cycle triggered by receiving
      a write command from a client.
      
      (cherry picked from commit cb961d8c)
      5b8e3951
    • Omer Shadmi's avatar
      Avoid exiting to allow diskless loading to recover from RDB short read on module AUX data (#9199) · 9914b676
      Omer Shadmi authored
      Currently a replica is able to recover from a short read (when diskless loading
      is enabled) and avoid crashing/exiting, replying to the master and then the rdb
      could be sent again by the master for another load attempt by the replica.
      There were a few scenarios that were not behaving similarly, such as when
      there is no end-of-file marker, or when module aux data failed to load, which
      should be allowed to occur due to a short read.
      
      (cherry picked from commit f06d782f)
      9914b676
    • Oran Agra's avatar
      Fix race in client side tracking (#9116) · abd44c83
      Oran Agra authored
      The `Tracking gets notification of expired keys` test in tracking.tcl
      used to hung in valgrind CI quite a lot.
      
      It turns out the reason is that with valgrind and a busy machine, the
      server cron active expire cycle could easily run in the same event loop
      as the command that created `mykey`, so that when they key got expired,
      there were two change events to broadcast, one that set the key and one
      that expired it, but since we used raxTryInsert, the client that was
      associated with the "last" change was the one that created the key, so
      the NOLOOP filtered that event.
      
      This commit adds a test that reproduces the problem by using lazy expire
      in a multi-exec which makes sure the key expires in the same event loop
      as the one that added it.
      
      (cherry picked from commit 9b564b52)
      abd44c83
    • Maxim Galushka's avatar
      redis-cli: support for REDIS_REPLY_SET in CSV and RAW output. (#7338) · f70916f8
      Maxim Galushka authored
      Fixes #6792. Added support of REDIS_REPLY_SET in raw and csv output of `./redis-cli`
      
      Test:
      
      run commands to test:
        ./redis-cli -3 --csv COMMAND
        ./redis-cli -3 --raw COMMAND
      
      Now they are returning resuts, were failing with: "Unknown reply type: 10" before the change.
      
      (cherry picked from commit 96bb0785)
      f70916f8
  2. 01 Jun, 2021 11 commits
  3. 03 May, 2021 18 commits
  4. 19 Apr, 2021 3 commits
    • Oran Agra's avatar
      Redis 6.2.2 · aa730ef1
      Oran Agra authored
      aa730ef1
    • Viktor Söderqvist's avatar
    • Hanna Fadida's avatar
      Modules: adding a module type for key space notification (#8759) · 53a4d6c3
      Hanna Fadida authored
      Adding a new type mask ​for key space notification, REDISMODULE_NOTIFY_MODULE, to enable unique notifications from commands on REDISMODULE_KEYTYPE_MODULE type keys (which is currently unsupported).
      
      Modules can subscribe to a module key keyspace notification by RM_SubscribeToKeyspaceEvents,
      and clients by notify-keyspace-events of redis.conf or via the CONFIG SET, with the characters 'd' or 'A' 
      (REDISMODULE_NOTIFY_MODULE type mask is part of the '**A**ll' notation for key space notifications).
      
      Refactor: move some pubsub test infra from pubsub.tcl to util.tcl to be re-used by other tests.
      53a4d6c3