1. 02 Sep, 2021 1 commit
  2. 31 Aug, 2021 1 commit
    • Viktor Söderqvist's avatar
      Slot-to-keys using dict entry metadata (#9356) · f24c63a2
      Viktor Söderqvist authored
      
      
      * Enhance dict to support arbitrary metadata carried in dictEntry
      Co-authored-by: default avatarViktor Söderqvist <viktor.soderqvist@est.tech>
      
      * Rewrite slot-to-keys mapping to linked lists using dict entry metadata
      
      This is a memory enhancement for Redis Cluster.
      
      The radix tree slots_to_keys (which duplicates all key names prefixed with their
      slot number) is replaced with a linked list for each slot. The dict entries of
      the same cluster slot form a linked list and the pointers are stored as metadata
      in each dict entry of the main DB dict.
      
      This commit also moves the slot-to-key API from db.c to cluster.c.
      Co-authored-by: default avatarJim Brunner <brunnerj@amazon.com>
      f24c63a2
  3. 30 Aug, 2021 2 commits
    • Oran Agra's avatar
      Tune timeout of active defrag test (#9426) · 1e7ad894
      Oran Agra authored
      Failed on Raspberry Pi 3b where that single test took about 170 seconds
      1e7ad894
    • Wang Yuan's avatar
      Use sync_file_range to optimize fsync if possible (#9409) · 9a0c0617
      Wang Yuan authored
      We implement incremental data sync in rio.c by call fsync, on slow disk, that may cost a lot of time,
      sync_file_range could provide async fsync, so we could serialize key/value and sync file data at the same time.
      
      > one tip for sync_file_range usage: http://lkml.iu.edu/hypermail/linux/kernel/1005.2/01845.html
      
      Additionally, this change avoids a single large write to be used, which can result in a mass of dirty
      pages in the kernel (increasing the risk of someone else's write to block).
      
      On HDD, current solution could reduce approximate half of dumping RDB time,
      this PR costs 50s for dump 7.7G rdb but unstable branch costs 93s.
      On NVME SSD, this PR can't reduce much time,  this PR costs 40s, unstable branch costs 48s.
      
      Moreover, I find calling data sync every 4MB is better than 32MB.
      9a0c0617
  4. 29 Aug, 2021 2 commits
    • Binbin's avatar
      Better error handling for updateClientOutputBufferLimit. (#9308) · aefbc234
      Binbin authored
      This one follow #9313 and goes deeper (validation of config file parsing)
      
      Move the check/update logic to a new updateClientOutputBufferLimit
      function. So that it can be used in CONFIG SET and config file parsing.
      aefbc234
    • Viktor Söderqvist's avatar
      redis-benchmark: improved help and warnings (#9419) · 97dcf95c
      Viktor Söderqvist authored
      1. The output of --help:
      
        * On the Usage line, just write [OPTIONS] [COMMAND ARGS...] instead listing
          only a few arbitrary options and no command.
        * For --cluster, describe that if the command is supplied on the command line,
          the key must contain "{tag}". Otherwise, the command will not be sent to the
          right cluster node.
        * For -r, add a note that if -r is omitted, all commands in a benchmark will
          use the same key. Also align the description.
        * For -t, describe that -t is ignored if a command is supplied on the command
          line.
      
      2. Print a warning if -t is present when a specific command is supplied.
      
      3. Print all warnings and errors to stderr.
      
      4. Remove -e from calls in redis-benchmark test suite.
      97dcf95c
  5. 25 Aug, 2021 1 commit
  6. 24 Aug, 2021 1 commit
    • Garen Chan's avatar
      Fix boundary problem of adjusting open files limit. (#5722) · 945a83d4
      Garen Chan authored
      When `decr_step` is greater than `oldlimit`, the final `bestlimit` may be invalid.
      
          For example, oldlimit = 10, decr_step = 16.
          Current bestlimit = 15 and setrlimit() failed. Since bestlimit  is less than decr_step , then exit the loop.
          The final bestlimit is larger than oldlimit but is invalid.
      
      Note that this only matters if the system fd limit is below 16, so unlikely to have any actual effect.
      945a83d4
  7. 23 Aug, 2021 1 commit
    • Wen Hui's avatar
      config memory limits: handle values larger than (signed) LLONG_MAX (#9313) · 641780a9
      Wen Hui authored
      This aims to solve the issue in CONFIG SET maxmemory can only set maxmemory to up
      to 9223372036854775807 (2^63) while the maxmemory should be ULLONG.
      Added a memtoull function to convert a string representing an amount of memory
      into the number of bytes (similar to memtoll but for ull). Also added ull2string to
      convert a ULLong to string (Similar to ll2string).
      641780a9
  8. 22 Aug, 2021 3 commits
  9. 20 Aug, 2021 1 commit
  10. 18 Aug, 2021 2 commits
  11. 15 Aug, 2021 1 commit
  12. 14 Aug, 2021 1 commit
  13. 12 Aug, 2021 3 commits
  14. 11 Aug, 2021 1 commit
    • Yossi Gottlieb's avatar
      Add debian:oldoldstable build target for CI. (#9358) · 08c46f2b
      Yossi Gottlieb authored
      Making sure Redis builds properly on older compiler is important given the wide range of systems it is built for. So far Ubuntu 16.04 has been used for this purpose, but as it's getting phased out we'll move to `oldoldstable` Debian as an "old system" precursor.
      08c46f2b
  15. 10 Aug, 2021 6 commits
  16. 09 Aug, 2021 4 commits
    • sundb's avatar
      Sanitize dump payload: handle remaining empty key when RDB loading and restore command (#9349) · cbda4929
      sundb authored
      This commit mainly fixes empty keys due to RDB loading and restore command,
      which was omitted in #9297.
      
      1) When loading quicklsit, if all the ziplists in the quicklist are empty, NULL will be returned.
          If only some of the ziplists are empty, then we will skip the empty ziplists silently.
      2) When loading hash zipmap, if zipmap is empty, sanitization check will fail.
      3) When loading hash ziplist, if ziplist is empty, NULL will be returned.
      4) Add RDB loading test with sanitize.
      cbda4929
    • Qu Chen's avatar
      Cleanup: createAOFClient uses createClient to avoid overlooked mismatches (#9338) · 0b643e93
      Qu Chen authored
      AOF fake client creation (createAOFClient) was doing similar work as createClient,
      with some minor differences, most of which unintended, this was dangerous and
      meant that many changes to createClient should have always been reflected to aof.c
      
      This cleanup changes createAOFClient to call createClient with NULL, like we
      do in module.c and elsewhere.
      0b643e93
    • Eduardo Semprebon's avatar
      Add SORT_RO command (#9299) · d3356bf6
      Eduardo Semprebon authored
      Add a readonly variant of the STORE command, so it can be used on
      read-only workloads (replica, ACL, etc)
      d3356bf6
    • Qu Chen's avatar
      Allow master to replicate command longer than replica's query buffer limit (#9340) · e8eeba7b
      Qu Chen authored
      Replication client no longer checks incoming command length against the client-query-buffer-limit. This makes the master able to replicate commands longer than replica's configured client-query-buffer-limit 
      e8eeba7b
  17. 08 Aug, 2021 3 commits
  18. 07 Aug, 2021 1 commit
  19. 06 Aug, 2021 1 commit
  20. 05 Aug, 2021 4 commits
    • Oran Agra's avatar
      corrupt-dump-fuzzer test, avoid creating junk keys (#9302) · 3f3f678a
      Oran Agra authored
      The execution of the RPOPLPUSH command by the fuzzer created junk keys,
      that were later being selected by RANDOMKEY and modified.
      This also meant that lists were statistically tested more than other
      files.
      
      Fix the fuzzer not to pass junk key names to RPOPLPUSH, and add a check
      that detects that new keys are not added by the fuzzer to detect future
      similar issues.
      3f3f678a
    • Oran Agra's avatar
      Improvements to corrupt payload sanitization (#9321) · 0c90370e
      Oran Agra authored
      
      
      Recently we found two issues in the fuzzer tester: #9302 #9285
      After fixing them, more problems surfaced and this PR (as well as #9297) aims to fix them.
      
      Here's a list of the fixes
      - Prevent an overflow when allocating a dict hashtable
      - Prevent OOM when attempting to allocate a huge string
      - Prevent a few invalid accesses in listpack
      - Improve sanitization of listpack first entry
      - Validate integrity of stream consumer groups PEL
      - Validate integrity of stream listpack entry IDs
      - Validate ziplist tail followed by extra data which start with 0xff
      Co-authored-by: default avatarsundb <sundbcn@gmail.com>
      0c90370e
    • sundb's avatar
      Sanitize dump payload: fix empty keys when RDB loading and restore command (#9297) · 8ea777a6
      sundb authored
      
      
      When we load rdb or restore command, if we encounter a length of 0, it will result in the creation of an empty key.
      This could either be a corrupt payload, or a result of a bug (see #8453 )
      
      This PR mainly fixes the following:
      1) When restore command will return `Bad data format` error.
      2) When loading RDB, we will silently discard the key.
      Co-authored-by: default avatarOran Agra <oran@redislabs.com>
      8ea777a6
    • Madelyn Olson's avatar
      Add debug config flag to print certain config values on engine crash (#9304) · 39a4a44d
      Madelyn Olson authored
      Add debug config flag to print certain config values on engine crash
      39a4a44d