1. 10 Mar, 2021 1 commit
    • sundb's avatar
      Add run all test support with define REDIS_TEST (#8570) · 95d6297d
      sundb authored
      1. Add `redis-server test all` support to run all tests.
      2. Add redis test to daily ci.
      3. Add `--accurate` option to run slow tests for more iterations (so that
         by default we run less cycles (shorter time, and less prints).
      4. Move dict benchmark to REDIS_TEST.
      5. fix some leaks in tests
      6. make quicklist tests run on a specific fill set of options rather than huge ranges
      7. move some prints in quicklist test outside their loops to reduce prints
      8. removing sds.h from dict.c since it is now used in both redis-server and
         redis-cli (uses hiredis sds)
      95d6297d
  2. 09 Mar, 2021 4 commits
  3. 08 Mar, 2021 5 commits
    • Huang Zhw's avatar
      __quicklistCompress may compress more node than required (#8311) · 9b4edfdf
      Huang Zhw authored
      When a quicklist has quicklist->compress * 2 nodes, then call
      __quicklistCompress, all nodes will be decompressed and the middle
      two nodes will be recompressed again. This violates the fact that
      quicklist->compress * 2 nodes are uncompressed. It's harmless
      because when visit a node, we always try to uncompress node first.
      This only happened when a quicklist has quicklist->compress * 2 + 1
      nodes, then delete a node. For other scenarios like insert node and
      iterate this will not happen.
      9b4edfdf
    • Yossi Gottlieb's avatar
    • Yossi Gottlieb's avatar
      Fix flaky unit/maxmemory test on MacOS/BSD. (#8619) · 7d81f392
      Yossi Gottlieb authored
      It seems like non-Linux sockets may be less greedy, resulting with more
      transient client output buffers.
      
      Haven't proven this but empirically when stressing this test on
      non-Linux tends to exhibit increased mem_clients_normal values.
      7d81f392
    • guybe7's avatar
      Fix edge-case when a module client is unblocked (#8618) · e58118cd
      guybe7 authored
      Scenario:
      1. A module client is blocked on keys with a timeout
      2. Shortly before the timeout expires, the key is being populated and signaled
         as ready
      3. Redis calls moduleTryServeClientBlockedOnKey (which replies to client) and
         then moduleUnblockClient
      4. moduleUnblockClient doesn't really unblock the client, it writes to
         server.module_blocked_pipe and only marks the BC as unblocked.
      5. beforeSleep kics in, by this time the client still exists and techincally
         timed-out. beforeSleep replies to the timeout client (double reply) and
         only then moduleHandleBlockedClients is called, reading from module_blocked_pipe
         and calling unblockClient
      
      The solution is similar to what was done in moduleTryServeClientBlockedOnKey: we
      should avoid re-processing an already-unblocked client
      e58118cd
    • Pavlo Yatsukhnenko's avatar
      Wrong usage sdscatprintf in redis-cli. (#8604) · 20377a6f
      Pavlo Yatsukhnenko authored
      The result of `sdscatprintf` is doubled when using argument twice.
      20377a6f
  4. 07 Mar, 2021 2 commits
  5. 05 Mar, 2021 3 commits
  6. 04 Mar, 2021 3 commits
    • Yossi Gottlieb's avatar
      Improve redis-cli non-binary safe string handling. (#8566) · 3c7d6a18
      Yossi Gottlieb authored
      * The `redis-cli --scan` output should honor output mode (set explicitly or implicitly), and quote key names when not in raw mode.
        * Technically this is a breaking change, but it should be very minor since raw mode is by default on for non-tty output.
        * It should only affect  TTY output (human users) or non-tty output if `--no-raw` is specified.
      
      * Added `--quoted-input` option to treat all arguments as potentially quoted strings.
      * Added `--quoted-pattern` option to accept a potentially quoted pattern.
      
      Unquoting is applied to potentially quoted input only if single or double quotes are used. 
      
      Fixes #8561, #8563
      3c7d6a18
    • sundb's avatar
      Fix memory overlap in quicklistRotate (#8599) · f07b7393
      sundb authored
      When the length of the quicklist is 1(only one zipmap), the rotate operation will cause
      memory overlap when moving an entity from the tail of the zipmap to the head.
      quicklistRotate is a dead code, so it has no impact on the existing code.
      f07b7393
    • YaacovHazan's avatar
      Fix RedisModule_IsAOFClient Redis Module API (#8596) · ac918229
      YaacovHazan authored
      Since the API declared (as #define) in redismodule.h and uses
      the CLIENT_ID_AOF that declared in the server.h, when
      a module will want to make use of this API, it will get a compilation
      error (module doesn't include the server.h).
      
      The API was broken by d6eb3afd (failed attempt for a cleanup).
      Revert to the original version of RedisModule_IsAOFClient
      that uses UINT64_MAX instead of CLIENT_ID_AOF
      ac918229
  7. 03 Mar, 2021 3 commits
  8. 02 Mar, 2021 2 commits
  9. 01 Mar, 2021 6 commits
  10. 28 Feb, 2021 3 commits
    • Pavlo Yatsukhnenko's avatar
      Fix div by 0 in redis-cli cluster creation (#8553) · 18ff8cd1
      Pavlo Yatsukhnenko authored
      This could happen on an invalid use, when trying to create a cluster with
      a single node and provide it's address 3 time to satisfy redis-cli requirements.
      18ff8cd1
    • Bonsai's avatar
      Module API for getting user name of a client (#8508) · 17c226b0
      Bonsai authored
      Adding RM_GetClientUserNameById to get the ACL user name of a client connection.
      17c226b0
    • Viktor Söderqvist's avatar
      Shared reusable client for RM_Call() (#8516) · 6122f1c4
      Viktor Söderqvist authored
      A single client pointer is added in the server struct. This is
      initialized by the first RM_Call() and reused for every subsequent
      RM_Call() except if it's already in use, which means that it's not
      used for (recursive) module calls to modules. For these, a new
      "fake" client is created each time.
      
      Other changes:
      * Avoid allocating a dict iterator in pubsubUnsubscribeAllChannels
        when not needed
      6122f1c4
  11. 26 Feb, 2021 1 commit
  12. 25 Feb, 2021 2 commits
  13. 24 Feb, 2021 5 commits