1. 18 Jul, 2021 2 commits
  2. 17 Jul, 2021 2 commits
  3. 16 Jul, 2021 1 commit
  4. 15 Jul, 2021 1 commit
  5. 14 Jul, 2021 3 commits
  6. 13 Jul, 2021 1 commit
  7. 11 Jul, 2021 4 commits
    • perryitay's avatar
      Fail EXEC command in case a watched key is expired (#9194) · ac8b1df8
      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>
      ac8b1df8
    • Huang Zhw's avatar
      Do not install a file event to send data to rewrite child when parent stop... · cb961d8c
      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.
      cb961d8c
    • Binbin's avatar
      Add test for ziplist (nextdiff == -4 && reqlen < 4) (#9218) · fe5d3251
      Binbin authored
      The if judgement `nextdiff == -4 && reqlen < 4` in __ziplistInsert.
      It's strange, but it's useful. Without it there will be problems during
      chain update.
      Till now these lines didn't have coverage in the tests, and there was
      a question if they are at all needed (#7170)
      fe5d3251
    • Yossi Gottlieb's avatar
      Pre-test bind-source-addr before running test. (#9214) · 92e80047
      Yossi Gottlieb authored
      This attempts to catch any non-standard configuration where the test may
      fail and produce a false positive.
      92e80047
  8. 10 Jul, 2021 1 commit
  9. 09 Jul, 2021 1 commit
  10. 07 Jul, 2021 1 commit
    • Mikhail Fesenko's avatar
      Direct redis-cli repl prints to stderr, because --rdb can print to stdout.... · 1eb4baa5
      Mikhail Fesenko authored
      
      Direct redis-cli repl prints to stderr, because --rdb can print to stdout. fflush stdout after responses  (#9136)
      
      1. redis-cli can output --rdb data to stdout
         but redis-cli also write some messages to stdout which will mess up the rdb.
      
      2. Make redis-cli flush stdout when printing a reply
        This was needed in order to fix a hung in redis-cli test that uses
        --replica.
         Note that printf does flush when there's a newline, but fwrite does not.
      
      3. fix the redis-cli --replica test which used to pass previously
         because it didn't really care what it read, and because redis-cli
         used printf to print these other things to stdout.
      
      4. improve redis-cli --replica test to run with both diskless and disk-based.
      Co-authored-by: default avatarOran Agra <oran@redislabs.com>
      Co-authored-by: default avatarViktor Söderqvist <viktor@zuiderkwast.se>
      1eb4baa5
  11. 06 Jul, 2021 3 commits
  12. 05 Jul, 2021 7 commits
  13. 04 Jul, 2021 2 commits
  14. 03 Jul, 2021 1 commit
  15. 01 Jul, 2021 3 commits
    • Yossi Gottlieb's avatar
      Fix CLIENT UNBLOCK crashing modules. (#9167) · aa139e2f
      Yossi Gottlieb authored
      Modules that use background threads with thread safe contexts are likely
      to use RM_BlockClient() without a timeout function, because they do not
      set up a timeout.
      
      Before this commit, `CLIENT UNBLOCK` would result with a crash as the
      `NULL` timeout callback is called. Beyond just crashing, this is also
      logically wrong as it may throw the module into an unexpected client
      state.
      
      This commits makes `CLIENT UNBLOCK` on such clients behave the same as
      any other client that is not in a blocked state and therefore cannot be
      unblocked.
      aa139e2f
    • Oran Agra's avatar
      Fix bug in sdscatfmt when % is the last format char (#9173) · de9bae21
      Oran Agra authored
      
      
      For the sdscatfmt function in sds.c, when the parameter fmt ended up with '%',
      the behavior is undefined. This commit fix this bug.
      Co-authored-by: default avatarstafuc <stafuc@gmail.com>
      de9bae21
    • Wang Yuan's avatar
      Don't start in sentinel mode if only the folder name contains redis-sentinel (#9176) · 16e04ed9
      Wang Yuan authored
      Before this commit, redis-server starts in sentinel mode if the first startup
      argument has the string redis-sentinel, so redis also starts in sentinel mode
      if the directory it was started from contains the string redis-sentinel.
      Now we check the executable name instead of directory.
      
      Some examples:
      1. Execute ./redis-sentinel/redis/src/redis-sentinel, starts in sentinel mode.
      2. Execute ./redis-sentinel/redis/src/redis-server, starts in server mode,
         but before, redis will start in sentinel mode.
      3. Execute ./redis-sentinel/redis/src/redis-server --sentinel, of course, like
         before, starts in sentinel mode.
      16e04ed9
  16. 30 Jun, 2021 7 commits
    • ZhaolongLi's avatar
      Fix range issues in default value of LIMIT argument to XADD and XTRIM (#9147) · 6476c8e8
      ZhaolongLi authored
      
      
      This seems to be an unimportant bug that was accidentally generated. If the user does not specify limit in streamParseAddOrTrimArgsOrReply, the initial value of args->limit is 100 * server.stream_node_max_entries, which may lead to out of bounds, and then the default function of limit in xadd becomes invalid (this failure occurs in streamTrim).
      
      Additionally, provide sane default for args->limit in case stream_node_max_entries is set to 0.
      Co-authored-by: default avatarlizhaolong.lzl <lizhaolong.lzl@B-54MPMD6R-0221.local>
      Co-authored-by: default avatarOran Agra <oran@redislabs.com>
      Co-authored-by: default avatarguybe7 <guy.benoish@redislabs.com>
      6476c8e8
    • Mikhail Fesenko's avatar
      redis-cli --rdb: fix broken fsync/ftruncate for stdout (#9135) · 74fe15b3
      Mikhail Fesenko authored
      
      
      A change in redis 6.2 caused redis-cli --rdb that's directed to stdout to fail because fsync fails.
      This commit avoids doing ftruncate (fails with a warning) and fsync (fails with an error) when the
      output file is `-`, and adds the missing documentation that `-` means stdout.
      Co-authored-by: default avatarOran Agra <oran@redislabs.com>
      Co-authored-by: default avatarWang Yuan <wangyuancode@163.com>
      74fe15b3
    • Rob Snyder's avatar
      Fix ziplist length updates on bigendian platforms (#2080) · eaa52719
      Rob Snyder authored
      Adds call to intrev16ifbe to ensure ZIPLIST_LENGTH is compared correctly
      eaa52719
    • Huang Zhw's avatar
      Make redis-cli --help/-h output to stdout and exit with 0. (#9124) · 70dac4b4
      Huang Zhw authored
      If user executes redis-cli --help, the content should be output to stdout and exits with 0.
      70dac4b4
    • Binbin's avatar
      Add missing pause tcl test to test_helper.tcl (#9158) · 5dddf496
      Binbin authored
      * Add keyname tags to avoid CROSSSLOT errors in external server CI
      * Use new wait_for_blocked_clients_count in pause.tcl
      5dddf496
    • luvine's avatar
      HSETNX can lead coding type change even when skipped due to NX (#4615) · 4278c45c
      luvine authored
      1. Add one key-value pair to myhash, which the length of key and value both less than hash-max-ziplist-value, for example:
      >hset myhash key value
      2. Then execute the following command
      >hsetnx myhash key value1 (the length greater than hash-max-ziplist-value)
      3. This will add nothing, but the code type of "myhash" changed from ziplist to dict even there are only one key-value pair in "myhash", and both of them less than hash-max-ziplist-value.
      4278c45c
    • Binbin's avatar
      Fix timing issue in psync2 test. (#9159) · 1d5aa37d
      Binbin authored
      
      
      *** [err]: PSYNC2: total sum of full synchronizations is exactly 4 intests/integration/psync2.tcl
      Expected 5 == 4 (context: type eval line 8 cmd {assert {$sum == 4}} proc::test)
      
      Sometime the test got an unexpected full sync since a replica switch to master,
      before the new master change propagated the new replid to all replicas,
      a replica attempted to sync with it using a wrong replid and triggered a full resync.
      
      Consider this scenario:
          1 slaveof 4 full resync
          0 slaveof 4 full resync
          2 slaveof 0 full resync
          3 slaveof 1 full resync
      
          1 slaveof no one, replid changed
          3 reconnect 1, did a partial resyn and got the new replid
      
          Before 2 inherits the new replid.
          3 slaveof 2
          3 try to do a partial resyn with 2.
          But their replication ids are inconsistent, so a full resync happens.
      
      :) A special thank you for oran and helping me in this test case.
      Co-authored-by: default avatarOran Agra <oran@redislabs.com>
      1d5aa37d