- 27 Oct, 2020 13 commits
-
-
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)
-
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)
-
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)
-
Madelyn Olson authored
partial cherry pick from 7d217547
-
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)
-
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)
-
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)
-
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)
-
Guy Benoish authored
Same goes for XGROUP DELCONSUMER (But in this case, it doesn't have any visible effect) (cherry picked from commit 3a441c7d)
-
- 24 Apr, 2020 1 commit
-
-
antirez authored
-
- 23 Apr, 2020 2 commits
-
-
yanhui13 authored
-
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.
-
- 17 Apr, 2020 2 commits
- 08 Apr, 2020 1 commit
-
-
antirez authored
See #7071.
-
- 12 Mar, 2020 1 commit
-
-
antirez authored
-
- 11 Mar, 2020 1 commit
-
-
Dustin Collins authored
-
- 05 Mar, 2020 18 commits
-
-
srzhao authored
-
Ariel authored
-
Guy Benoish authored
Use built-in alsoPropagate mechanism that wraps commands in MULTI/EXEC before sending them to replica/AOF
-
Oran Agra authored
currently there's no bug since the flags these functions handle are always lower than 32bit, but still better fix the type to prevent future bugs.
-
Guy Benoish authored
1. server.repl_no_slaves_since can be set when a MONITOR client disconnects 2. c->repl_ack_time can be set by a newline from a MONITOR client 3. Improved comments
-
WuYunlong authored
-
antirez authored
-
WuYunlong authored
-
antirez authored
Related to #6054.
-
antirez authored
We exit later, so no bug fixed, but it is more correct. See #6054, thanks to @ShooterIT for finding the issue.
-
WuYunlong authored
-
WuYunlong authored
-
Leo Murillo authored
-
Guy Benoish authored
This commit solves the following bug: 127.0.0.1:6379> XGROUP CREATE x grp $ MKSTREAM OK 127.0.0.1:6379> XADD x 666 f v "666-0" 127.0.0.1:6379> XREADGROUP GROUP grp Alice BLOCK 0 STREAMS x > 1) 1) "x" 2) 1) 1) "666-0" 2) 1) "f" 2) "v" 127.0.0.1:6379> XADD x 667 f v "667-0" 127.0.0.1:6379> XDEL x 667 (integer) 1 127.0.0.1:6379> XREADGROUP GROUP grp Alice BLOCK 0 STREAMS x > 1) 1) "x" 2) (empty array) The root cause is that we use s->last_id in streamCompareID while we should use the last *valid* ID
-
antirez authored
Fixes #6744.
-
Guy Benoish authored
This commit solves several edge cases that are related to exhausting the streamID limits: We should correctly calculate the succeeding streamID instead of blindly incrementing 'seq' This affects both XREAD and XADD. Other (unrelated) changes: Reply with a better error message when trying to add an entry to a stream that has exhausted last_id
-
antirez authored
-
antirez authored
This bug is from the first version of Redis. Probably the problem here is that before we used an SDS split function that created empty strings for additional spaces, like in "SET foo bar". AFAIK later we replaced it with the curretn sdssplitarg() API that has no such a problem. As a result, we introduced a bug, where it is no longer possible to do something like: SET foo "" Using the inline protocol. Now it is fixed.
-
- 12 Feb, 2020 1 commit
-
-
Khem Raj authored
This helps in avoiding multiple definition of this variable, its also defined globally in sds.c Signed-off-by:
Khem Raj <raj.khem@gmail.com>
-