- 04 Aug, 2020 1 commit
-
-
Tyson Andre authored
Syntax: `ZMSCORE KEY MEMBER [MEMBER ...]` This is an extension of #2359 amended by Tyson Andre to work with the changed unstable API, add more tests, and consistently return an array. - It seemed as if it would be more likely to get reviewed after updating the implementation. Currently, multi commands or lua scripting to call zscore multiple times would almost definitely be less efficient than a native ZMSCORE for the following reasons: - Need to fetch the set from the string every time instead of reusing the C pointer. - Using pipelining or multi-commands would result in more bytes sent by the client for the repeated `ZMSCORE KEY` sections. - Need to specially encode the data and decode it from the client for lua-based solutions. - The fastest solution I've seen for large sets(thousands or millions) involves lua and a variadic ZADD, then a ZINTERSECT, then a ZRANGE 0 -1, then UNLINK of a temporary set (or lua). This is still inefficient. Co-authored-by:
Tyson Andre <tysonandre775@hotmail.com>
-
- 02 Aug, 2020 1 commit
-
-
hujie authored
-
- 31 Jul, 2020 2 commits
-
-
Oran Agra authored
besides, hooks test was time sensitive. when the replica managed to reconnect quickly after the client kill, the test would fail
-
- 30 Jul, 2020 2 commits
-
-
fayadexinqing authored
broadcast a PONG message when slot's migration is over, which may reduce the moved request of clients (#7571)
-
Kevin McGehee authored
Use higher-level API to funnel all generic propagation through single function call.
-
- 29 Jul, 2020 4 commits
-
-
Yossi Gottlieb authored
-
Arun Ranganathan authored
Co-authored-by:
Oran Agra <oran@redislabs.com>
-
namtsui authored
The Redis sentinel would crash with a segfault after a few minutes because it tried to read from a page without read permissions. Check up front whether the sds is long enough to contain redis:slave or redis:master before memcmp() as is done everywhere else in sentinelRefreshInstanceInfo(). Bug report and commit message from Theo Buehler. Fix from Nam Nguyen. Co-authored-by:
Nam Nguyen <namn@berkeley.edu>
-
Wen Hui authored
-
- 28 Jul, 2020 3 commits
-
-
Wen Hui authored
valsize was not modified during the for loop below instead of getting from c->argv[4], therefore there is no need to put inside the for loop.. Moreover, putting the check outside loop will also avoid memory leaking, decrRefCount(key) should be called in the original code if we put the check in for loop
-
Yossi Gottlieb authored
The connection API may create an accepted connection object in an error state, and callers are expected to check it before attempting to use it. Co-authored-by:
mrpre <mrpre@163.com>
-
Jiayuan Chen authored
Adds an `optional` value to the previously boolean `tls-auth-clients` configuration keyword. Co-authored-by:
Yossi Gottlieb <yossigo@gmail.com>
-
- 27 Jul, 2020 1 commit
-
-
Yossi Gottlieb authored
Initialize and configure OpenSSL even when tls-port is not used, because we may still have tls-cluster or tls-replication. Also, make sure to reconfigure OpenSSL when these parameters are changed as TLS could have been enabled for the first time.
-
- 26 Jul, 2020 1 commit
-
-
grishaf authored
-
- 24 Jul, 2020 1 commit
-
-
zhaozhao.zz authored
-
- 23 Jul, 2020 2 commits
-
-
Meir Shpilraien (Spielrein) authored
Co-authored-by:
Oran Agra <oran@redislabs.com> Co-authored-by:
Itamar Haber <itamar@redislabs.com>
-
Oran Agra authored
this code is in use only if the master is disk-based, and the replica is diskless. In this case we use a buffered reader, but we must avoid reading past the rdb file, into the command stream. which Luckly rdb.c doesn't really attempt to do (it knows how much it should read). When rioConnRead detects that the extra buffering attempt reaches beyond the read limit it should read less, but if the caller actually requested more, then it should return with an error rather than a short read. the bug would have resulted in short read. in order to fix it, the code must consider the real requested size, and not the extra buffering size.
-
- 22 Jul, 2020 1 commit
-
-
Madelyn Olson authored
-
- 21 Jul, 2020 3 commits
-
-
WuYunlong authored
Before that PR, processCommand() did not notice that cmd could be a module command in which case getkeys_proc member has a different meaning. The outcome was that a module command which doesn't take any key names in its arguments (similar to SLOWLOG) would be handled as if it might have key name arguments (similar to MEMORY), would consider cluster redirect but will end up with 0 keys after an excessive call to getKeysFromCommand, and eventually do the right thing.
-
Wen Hui authored
Since the dynamic allocations in raxIterator are only used for deep walks, memory leak due to missing call to raxStop can only happen for rax with key names longer than 32 bytes. Out of all the missing calls, the only ones that may lead to a leak are the rax for consumer groups and consumers, and these were only in AOFRW and rdbSave, which normally only happen in fork or at shutdown.
-
Wen Hui authored
-
- 20 Jul, 2020 3 commits
-
-
zhaozhao.zz authored
-
WuYunlong authored
Before this commit, processCommand() did not notice that cmd could be a module command which declared `getkeys-api` and handled it for the purpose of cluster redirect it as if it doesn't use any keys. This commit fixed it by reusing the codes in addReplyCommand().
-
WuYunlong authored
It will never happen that "lp != NULL && lp_bytes >= server.stream_node_max_bytes". Assume that "lp != NULL && lp_bytes >= server.stream_node_max_bytes", we got the following conditions: a. lp != NULL b. lp_bytes >= server.stream_node_max_bytes If server.stream_node_max_bytes is 0, given condition a, condition b is always satisfied If server.stream_node_max_bytes is not 0, given condition a and condition b, the codes just a few lines above set lp to NULL, a controdiction with condition a So that condition b is recundant. We could delete it safely.
-
- 16 Jul, 2020 2 commits
-
-
yoav-steinberg authored
Specifically, the key passed to the module aof_rewrite callback is a stack allocated robj. When passing it to RedisModule_EmitAOF (with appropriate "s" fmt string) redis used to panic when trying to inc the ref count of the stack allocated robj. Now support such robjs by coying them to a new heap robj. This doesn't affect performance because using the alternative "c" or "b" format strings also copies the input to a new heap robj.
-
杨博东 authored
-
- 15 Jul, 2020 6 commits
-
-
Luke Palmer authored
-
dmurnane authored
Co-authored-by:
Daniel Murnane <dmurnane@eitccorp.com>
-
Developer-Ecosystem-Engineering authored
Export following environment variables before building on macOS on Apple silicon export ARCH_FLAGS="-arch arm64" export SDK_NAME=macosx export SDK_PATH=$(xcrun --show-sdk-path --sdk $SDK_NAME) export CFLAGS="$ARCH_FLAGS -isysroot $SDK_PATH -I$SDK_PATH/usr/include" export CXXFLAGS=$CFLAGS export LDFLAGS="$ARCH_FLAGS" export CC="$(xcrun -sdk $SDK_PATH --find clang) $CFLAGS" export CXX="$(xcrun -sdk $SDK_PATH --find clang++) $CXXFLAGS" export LD="$(xcrun -sdk $SDK_PATH --find ld) $LDFLAGS" make make test .. All tests passed without errors! Backtrack logging assumes x86 and required updating
-
Wen Hui authored
-
WuYunlong authored
-
WuYunlong authored
-
- 14 Jul, 2020 1 commit
-
-
Oran Agra authored
in case the rdb child failed, crashed or terminated unexpectedly redis would have marked the replica clients with repl_put_online_on_ack and then kill them only after a minute when no ack was received. it would not stream anything to these connections, so the only effect of this bug is a delay of 1 minute in the replicas attempt to re-connect.
-
- 13 Jul, 2020 2 commits
- 11 Jul, 2020 2 commits
-
-
jimgreen2013 authored
* fix description about ZIP_BIG_PREVLEN(the code is ok), it's similar to antirez#4705 * fix description about ziplist entry encoding field (the code is ok), the max length should be 2^32 - 1 when encoding is 5 bytes
-
杨博东 authored
one of the differences (other than consistent code with SORT, GEORADIUS), is that the LFU of the old key is retained.
-
- 10 Jul, 2020 2 commits
-
-
马永泽 authored
Co-authored-by: Oran Agra <oran@redislabs.com> (styling)
-
Yossi Gottlieb authored
* TLS: Session caching configuration support. * TLS: Remove redundant config initialization.
-