1. 27 Oct, 2020 13 commits
    • Oran Agra's avatar
      Allow blocked XREAD on a cluster replica (#7881) · 89c68ba3
      Oran Agra authored
      I suppose that it was overlooked, since till recently none of the blocked commands were readonly.
      
      other changes:
      - add test for the above.
      - add better support for additional (and deferring) clients for
        cluster tests
      - improve a test which left the client in MULTI state.
      
      (cherry picked from commit 216c1106)
      89c68ba3
    • guybe7's avatar
      Modules: Invalidate saved_oparray after use (#7688) · fcda8293
      guybe7 authored
      We wanna avoid a chance of someone using the pointer in it after it'll be freed / realloced.
      
      (cherry picked from commit 65c24bd3)
      fcda8293
    • antirez's avatar
      Modules: remove spurious call from moduleHandleBlockedClients(). · cefd3392
      antirez authored
      Now we handle propagation when we free the context.
      
      (cherry picked from commit 4534960b)
      cefd3392
    • Angus Pearson's avatar
      Fix broken interval and repeat bahaviour in redis-cli (incluing cluster mode) · 10202ba1
      Angus Pearson authored
      This addresses two problems, one where infinite (negative) repeat count is broken for all types for Redis,
      and another specific to cluster mode where redirection is needed.
      
      Now allows and works correctly for negative (i.e. -1) repeat values passed with `-r` argument to redis-cli
      as documented here https://redis.io/topics/rediscli#continuously-run-the-same-command which seems to have
      regressed as a feature in 95b988 (though that commit removed bad integer wrap-around to `0` behaviour).
      
      This broken behaviour exists currently (e50458), and redis-cli will just exit immediately with repeat `-r <= 0`
      as opposed to send commands indefinitely as it should with `-r < 0`
      
      Additionally prevents a repeat * interval seconds hang/time spent doing nothing at the start before issuing
      commands in cluster mode (`-c`), where the command needed to redirect to a slot on another node, as commands
      where failing and waiting to be reissued but this was fully repeated before being reissued. For example,
      
              redis-cli -c -r 10 -i 0.5 INCR test_key_not_on_6379
      
      Would hang and show nothing for 5 seconds (10 * 0.5) before showing
      
              (integer) 1
              (integer) 2
              (integer) 3
              (integer) 4
              (integer) 5
              (integer) 6
              (integer) 7
              (integer) 8
              (integer) 9
              (integer) 10
      
      at half second intervals as intended.
      
      (cherry picked from commit 2f6ed933)
      10202ba1
    • antirez's avatar
      Cluster: introduce data_received field. · 97816fd6
      antirez authored
      We want to send pings and pongs at specific intervals, since our packets
      also contain information about the configuration of the cluster and are
      used for gossip. However since our cluster bus is used in a mixed way
      for data (such as Pub/Sub or modules cluster messages) and metadata,
      sometimes a very busy channel may delay the reception of pong packets.
      So after discussing it in #7216, this commit introduces a new field that
      is not exposed in the cluster, is only an internal information about
      the last time we received any data from a given node: we use this field
      in order to avoid detecting failures, claiming data reception of new
      data from the node is a proof of liveness.
      
      (cherry picked from commit 960186a7)
      97816fd6
    • Madelyn Olson's avatar
      Hide AUTH from monitor · 3b792f51
      Madelyn Olson authored
      partial cherry pick from 7d217547
      3b792f51
    • Guy Benoish's avatar
      Support streams in general module API functions · da2906e5
      Guy Benoish authored
      Fixes GitHub issue #6492
      Added stream support in RM_KeyType and RM_ValueLength.
      Also moduleDelKeyIfEmpty was updated, even though it has
      no effect now (It will be relevant when stream type direct
      API will be coded - i.e. RM_StreamAdd)
      
      cherry picked from commit 1833d008
      * modified to avoid adding new API to 5.0 (reverting the change to
        RM_KeyType)
      da2906e5
    • Itamar Haber's avatar
      Expands lazyfree's effort estimate to include Streams (#5794) · 18264d64
      Itamar Haber authored
      Otherwise, it is treated as a single allocation and freed synchronously. The following logic is used for estimating the effort in constant-ish time complexity:
      
      1. Check the number of nodes.
      1. Add an allocation for each consumer group registered inside the stream.
      1. Check the number of PELs in the first CG, and then add this count times the number of CGs.
      1. Check the number of consumers in the first CG, and then add this count times the number of CGs.
      
      (cherry picked from commit 5b0a06af)
      (cherry picked from commit 5a9a653f)
      18264d64
    • huangzhw's avatar
      defrag.c activeDefragSdsListAndDict when defrag sdsele, We can't use (#7492) · 918c9aa5
      huangzhw authored
      it to calculate hash, we should use newsds.
      
      (cherry picked from commit d6180c8c)
      (cherry picked from commit 7b21b8c3)
      918c9aa5
    • Oran Agra's avatar
      RESTORE ABSTTL skip expired keys - leak (#7511) · 8cc66985
      Oran Agra authored
      
      (cherry picked from commit 6a814501)
      (cherry picked from commit c4b428a3)
      8cc66985
    • Oran Agra's avatar
      RESTORE ABSTTL won't store expired keys into the db (#7472) · e9c9e4c2
      Oran Agra authored
      Similarly to EXPIREAT with TTL in the past, which implicitly deletes the
      key and return success, RESTORE should not store key that are already
      expired into the db.
      When used together with REPLACE it should emit a DEL to keyspace
      notification and replication stream.
      
      (cherry picked from commit 5977a948)
      (cherry picked from commit 95ba01b5)
      e9c9e4c2
    • Liu Zhen's avatar
      fix clusters mixing accidentally by gossip · ee4696b1
      Liu Zhen authored
      `clusterStartHandshake` will start hand handshake
      and eventually send CLUSTER MEET message, which is strictly prohibited
      in the REDIS CLUSTER SPEC.
      Only system administrator can initiate CLUSTER MEET message.
      Futher, according to the SPEC, rather than IP/PORT pairs, only nodeid
      can be trusted.
      
      (cherry picked from commit 84a7a905)
      ee4696b1
    • Guy Benoish's avatar
      XPENDING should not update consumer's seen-time · c9e370c6
      Guy Benoish authored
      Same goes for XGROUP DELCONSUMER (But in this case, it doesn't
      have any visible effect)
      
      (cherry picked from commit 3a441c7d)
      c9e370c6
  2. 24 Apr, 2020 1 commit
  3. 23 Apr, 2020 2 commits
    • yanhui13's avatar
      optimize the output of cluster slots · 7a62eb96
      yanhui13 authored
      7a62eb96
    • srzhao's avatar
      Check OOM at script start to get stable lua OOM state. · 0efb93d0
      srzhao authored
      Checking OOM by `getMaxMemoryState` inside script might get different result
      with `freeMemoryIfNeededAndSafe` at script start, because lua stack and
      arguments also consume memory.
      
      This leads to memory `borderline` when memory grows near server.maxmemory:
      
      - `freeMemoryIfNeededAndSafe` at script start detects no OOM, no memory freed
      - `getMaxMemoryState` inside script detects OOM, script aborted
      
      We solve this 'borderline' issue by saving OOM state at script start to get
      stable lua OOM state.
      
      related to issue #6565 and #5250.
      0efb93d0
  4. 17 Apr, 2020 2 commits
  5. 08 Apr, 2020 1 commit
  6. 12 Mar, 2020 1 commit
  7. 11 Mar, 2020 1 commit
  8. 05 Mar, 2020 18 commits
  9. 12 Feb, 2020 1 commit