1. 15 Jun, 2021 1 commit
  2. 14 Jun, 2021 5 commits
  3. 13 Jun, 2021 3 commits
    • Binbin's avatar
      Fix accidental deletion of sinterstore command when we meet wrong type error. (#9032) · b8a5da80
      Binbin authored
      SINTERSTORE would have deleted the dest key right away,
      even when later on it is bound to fail on an (WRONGTYPE) error.
      
      With this change it first picks up all the input keys, and only later
      delete the dest key if one is empty.
      
      Also add more tests for some commands.
      Mainly focus on 
      - `wrong type error`: 
      	expand test case (base on sinter bug) in non-store variant
      	add tests for store variant (although it exists in non-store variant, i think it would be better to have same tests)
      - the dstkey result when we meet `non-exist key (empty set)` in *store
      
      sdiff:
      - improve test case about wrong type error (the one we found in sinter, although it is safe in sdiff)
      - add test about using non-exist key (treat it like an empty set)
      sdiffstore:
      - according to sdiff test case, also add some tests about `wrong type error` and `non-exist key`
      - the different is that in sdiffstore, we will consider the `dstkey` result
      
      sunion/sunionstore add more tests (same as above)
      
      sinter/sinterstore also same as above ...
      b8a5da80
    • Binbin's avatar
      Remove duplicate dbid lookup in performEvictions. (#9063) · 5517f362
      Binbin authored
      Minor code cleanup.
      5517f362
    • ny0312's avatar
      Fix flaky test case for absolute TTL replication (#9069) · fb140a1b
      ny0312 authored
      The root cause is that one test (`5 keys in, 5 keys out`) is leaking a volatile key
      that can expire while another later test(`All TTL in commands are propagated
      as absolute timestamp in replication stream`) is running.
      Such leaked expiration injects an unexpected `DEL` command into the
      replication command during the later test, causing it to fail.
      
      The fixes are two fold:
      1. Plug the leak in the first test.
      2. Add FLUSHALL to the later test, to avoid future interference from other tests.
      fb140a1b
  4. 10 Jun, 2021 2 commits
    • ZhaolongLi's avatar
      63da66bb
    • Binbin's avatar
      Fixed some typos, add a spell check ci and others minor fix (#8890) · 0bfccc55
      Binbin authored
      This PR adds a spell checker CI action that will fail future PRs if they introduce typos and spelling mistakes.
      This spell checker is based on blacklist of common spelling mistakes, so it will not catch everything,
      but at least it is also unlikely to cause false positives.
      
      Besides that, the PR also fixes many spelling mistakes and types, not all are a result of the spell checker we use.
      
      Here's a summary of other changes:
      1. Scanned the entire source code and fixes all sorts of typos and spelling mistakes (including missing or extra spaces).
      2. Outdated function / variable / argument names in comments
      3. Fix outdated keyspace masks error log when we check `config.notify-keyspace-events` in loadServerConfigFromString.
      4. Trim the white space at the end of line in `module.c`. Check: https://github.com/redis/redis/pull/7751
      5. Some outdated https link URLs.
      6. Fix some outdated comment. Such as:
          - In README: about the rdb, we used to said create a `thread`, change to `process`
          - dbRandomKey function coment (about the dictGetRandomKey, change to dictGetFairRandomKey)
          - notifyKeyspaceEvent fucntion comment (add type arg)
          - Some others minor fix in comment (Most of them are incorrectly quoted by variable names)
      7. Modified the error log so that users can easily distinguish between TCP and TLS in `changeBindAddr`
      0bfccc55
  5. 08 Jun, 2021 5 commits
    • Wang Yuan's avatar
      Mem efficiency, make full use of client struct memory for reply buffers (#8968) · c396fd91
      Wang Yuan authored
      When we allocate a client struct with 16k reply buffer, the allocator we may give us 20K,
      This commit makes use of that extra space.
      Additionally, it tries to store whatever it can from the reply into the static 'buf' before
      allocating a new node for the reply list.
      c396fd91
    • Yang Bodong's avatar
      Verbose log enhancement: print client info when client exit (#9053) · 119121c7
      Yang Bodong authored
      It could be useful for debugging to know which client got disconnected.
      119121c7
    • guybe7's avatar
      Module API for current command name (#8792) · e16d3eb9
      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.
      e16d3eb9
    • ikeberlein's avatar
      Make redis-cli grep friendly in pubsub mode (#9013) · 77d44bb7
      ikeberlein authored
      redis-cli is grep friendly for all commands but SUBSCRIBE/PSUBSCRIBE.
      it is unable to process output from these commands line by line piped
      to another program because of output buffering. to overcome this
      situation I propose to flush stdout each time when it is written with
      reply from these commands the same way it is already done for all other
      commands.
      77d44bb7
    • Huang Zhw's avatar
      Fix some minor bugs in redis-cli (#8982) · 1df8c129
      Huang Zhw authored
      * clusterManagerAddSlots check argv_idx error.
      
      * clusterManagerLoadInfoFromNode remove unused param opts.
      
      * redis-cli node->ip may be an sds or a c string. Using %s to format
      is always right, %S may be wrong.
      
      * In clusterManagerFixOpenSlot clusterManagerBumpEpoch call is redundant,
      because it is already called in clusterManagerSetSlotOwner.
      
      * redis-cli cluster help add more commands in help messages.
      1df8c129
  6. 07 Jun, 2021 4 commits
  7. 06 Jun, 2021 2 commits
  8. 04 Jun, 2021 1 commit
  9. 03 Jun, 2021 1 commit
  10. 02 Jun, 2021 2 commits
  11. 01 Jun, 2021 4 commits
  12. 30 May, 2021 3 commits
    • Binbin's avatar
      Extend freeSlotsToKeysMapAsync and freeTrackingRadixTreeAsync to check LAZYFREE_THRESHOLD. (#8969) · 01495c67
      Binbin authored
      Without this fix, FLUSHALL ASYNC would have freed these in a background thread,
      even if they didn't contain many elements (unlike how it works with other structures), which could be inefficient.
      01495c67
    • Wang Yuan's avatar
      Make full use of aofrwblock's buf (#8975) · 58a03eca
      Wang Yuan authored
      Make aof rewrite buffer memory size more accurate, before, there may be 20%
      deviation with its real memory usage.
      
      The implication are both lower memory usage, and also a more accurate INFO.
      58a03eca
    • ny0312's avatar
      Always replicate time-to-live(TTL) as absolute timestamps in milliseconds (#8474) · 53d1acd5
      ny0312 authored
      Till now, on replica full-sync we used to transfer absolute time for TTL,
      however when a command arrived (EXPIRE or EXPIREAT),
      we used to propagate it as is to replicas (possibly with relative time),
      but always translate it to EXPIREAT (absolute time) to AOF.
      
      This commit changes that and will always use absolute time for propagation.
      see discussion in #8433
      
      Furthermore, we Introduce new commands: `EXPIRETIME/PEXPIRETIME`
      that allow extracting the absolute TTL time from a key.
      53d1acd5
  13. 26 May, 2021 1 commit
    • YaacovHazan's avatar
      unregister AE_READABLE from the read pipe in backgroundSaveDoneHandlerSocket (#8991) · 501d7755
      YaacovHazan authored
      In diskless replication, we create a read pipe for the RDB, between the child and the parent.
      When we close this pipe (fd), the read handler also needs to be removed from the event loop (if it still registered).
      Otherwise, next time we will use the same fd, the registration will be fail (panic), because
      we will use EPOLL_CTL_MOD (the fd still register in the event loop), on fd that already removed from epoll_ctl
      501d7755
  14. 24 May, 2021 1 commit
  15. 23 May, 2021 1 commit
  16. 22 May, 2021 1 commit
  17. 20 May, 2021 2 commits
  18. 19 May, 2021 1 commit