- 01 Oct, 2020 1 commit
-
-
Rafi Einstein authored
-
- 30 Sep, 2020 3 commits
-
-
nitaicaro authored
PROBLEM: [$rd1 read] reads invalidation messages one by one, so it's never going to see the second invalidation message produced after INCR b, whether or not it exists. Adding another read will block incase no invalidation message is produced. FIX: We switch the order of "INCR a" and "INCR b" - now "INCR b" comes first. We still only read the first invalidation message produces. If an invalidation message is wrongly produces for b - then it will be produced before that of a, since "INCR b" comes before "INCR a". Co-authored-by:
Nitai Caro <caronita@amazon.com>
-
Yossi Gottlieb authored
When REDISMODULE_EVENT_CLIENT_CHANGE events are delivered, modules may want to mutate the client state (e.g. perform authentication). This change links the module context with the real client rather than a fake client for these events.
-
Yossi Gottlieb authored
The client pointed to by the module context may in some cases be a fake client. RM_Authenticate*() calls in this case would be ineffective but appear to succeed, and this change fails them to make it easier to catch such cases.
-
- 29 Sep, 2020 6 commits
-
-
Yossi Gottlieb authored
The tls-ca-cert or tls-ca-cert-dir configuration parameters are only used when Redis needs to authenticate peer certificates, in one of these scenarios: 1. Incoming clients or replicas, with `tls-auth-clients` enabled. 2. A replica authenticating the master's peer certificate. 3. Cluster nodes authenticating other nodes when establishing the bus protocol connection.
-
YoongHM authored
- The argument `u` in for `ar` is ignored (and generates warnings since `D` became the default. All it does is avoid updating unchanged objects (shouldn't have any impact on our build) - Enable `LUA_USE_MKSTEMP` to force the use of `mkstemp()` instead of `tmpname()` (which is dead code in redis anyway). - Remove unused variable `c` in `f_parser()` - Removed misleadingly indented space in `luaL_loadfile()` and ``addfield()` Co-authored-by:
Oran Agra <oran@redislabs.com>
-
Oran Agra authored
-
David CARLIER authored
-
Gavrie Philipson authored
-
David CARLIER authored
-
- 28 Sep, 2020 1 commit
-
-
WuYunlong authored
-
- 27 Sep, 2020 3 commits
-
-
Oran Agra authored
Also stabilize new shutdown tests on slow machines (valgrind)
-
caozb authored
when slaveof config is "no one", reset any pre-existing config and resume. also solve a memory leak if slaveof appears twice. and fail loading if port number is out of range or not an integer. Co-authored-by:
caozhengbin <caozb@yidingyun.com> Co-authored-by:
Oran Agra <oran@redislabs.com>
-
Wang Yuan authored
There's currently an issue with IO threads and gopher (issuing lookupKey from within the thread). simply fix is to just not support it for now.
-
- 25 Sep, 2020 3 commits
-
-
Wang Yuan authored
We may access and modify these two variables in signal handler function, to guarantee them async-signal-safe, so we should set them to volatile sig_atomic_t type. It doesn't look like this could have caused any real issue, and it seems that signals are handled in main thread on most platforms. But we want to follow C and POSIX standard in signal handler function.
-
Uri Shachar authored
Make sure we handle short writes correctly, sync to disk after writing and use rename to make sure the replacement is actually atomic. In any case of failure old configuration will remain in place. Also, add some additional logging to make it easier to diagnose rewrite problems.
-
WuYunlong authored
We should sync temp DB file before renaming as rdb_fsync_range does not use flag `SYNC_FILE_RANGE_WAIT_AFTER`. Refer to `Linux Programmer's Manual`: SYNC_FILE_RANGE_WAIT_AFTER Wait upon write-out of all pages in the range after performing any write.
-
- 24 Sep, 2020 6 commits
-
-
Wen Hui authored
When fclose would fail, the previous implementation would have attempted to do fclose again this can in theory lead to segfault. other changes: check for non-zero return value as failure rather than a specific error code. this doesn't fix a real bug, just a minor cleanup.
-
Wang Yuan authored
Before this commit, we would have continued to add replies to the reply buffer even if client output buffer limit is reached, so the used memory would keep increasing over the configured limit. What's more, we shouldn’t write any reply to the client if it is set 'CLIENT_CLOSE_ASAP' flag because that doesn't conform to its definition and we will close all clients flagged with 'CLIENT_CLOSE_ASAP' in ‘beforeSleep’. Because of code execution order, before this, we may firstly write to part of the replies to the socket before disconnecting it, but in fact, we may can’t send the full replies to clients since OS socket buffer is limited. But this unexpected behavior makes some commands work well, for instance ACL DELUSER, if the client deletes the current user, we need to send reply to client and close the connection, but before, we close the client firstly and write the reply to reply buffer. secondly, we shouldn't do this despite the fact it works well in most cases. We add a flag 'CLIENT_CLOSE_AFTER_COMMAND' to mark clients, this flag means we will close the client after executing commands and send all entire replies, so that we can write replies to reply buffer during executing commands, send replies to clients, and close them later. We also fix some implicit problems. If client output buffer limit is enforced in 'multi/exec', all commands will be executed completely in redis and clients will not read any reply instead of partial replies. Even more, if the client executes 'ACL deluser' the using user in 'multi/exec', it will not read the replies after 'ACL deluser' just like before executing 'client kill' itself in 'multi/exec'. We added some tests for output buffer limit breach during multi-exec and using a pipeline of many small commands rather than one with big response. Co-authored-by:
Oran Agra <oran@redislabs.com>
-
Guy Korland authored
-
valentinogeron authored
XREADGROUP auto-creates the consumer inside the consumer group the first time it saw it. When XREADGROUP is being used with NOACK option, the message will not be added into the client's PEL and XGROUP SETID would be propagated. When the replica gets the XGROUP SETID it will only update the last delivered id of the group, but will not create the consumer. So, in this commit XGROUP CREATECONSUMER is being added. Command pattern: XGROUP CREATECONSUMER <key> <group> <consumer>. When NOACK option is being used, createconsumer command would be propagated as well. In case of AOFREWRITE, consumer with an empty PEL would be saved with XGROUP CREATECONSUMER whereas consumer with pending entries would be saved with XCLAIM
-
bodong.ybd authored
-
bodong.ybd authored
Syntax: ZINTER/ZUNION numkeys key [key ...] [WEIGHTS weight [weight ...]] [AGGREGATE SUM|MIN|MAX] [WITHSCORES] see #7624
-
- 23 Sep, 2020 4 commits
-
-
alexronke-channeladvisor authored
Co-authored-by:
Alex Ronke <w.alex.ronke@gmail.com>
-
Oran Agra authored
-
David CARLIER authored
mainly backtrace and register dump support.
-
WuYunlong authored
this is very dangerous bug, but it looks like it didn't cause any harm.
-
- 22 Sep, 2020 6 commits
-
-
yixiang authored
-
Oran Agra authored
-
Yossi Gottlieb authored
This happens only on diskless replicas when attempting to reconnect after failing to load an RDB file. It is more likely to occur with larger datasets. After reconnection is initiated, replicationEmptyDbCallback() may get called and try to write to an unconnected socket. This triggered another issue where the connection is put into an error state and the connect handler never gets called. The problem is a regression introduced by commit c17e597d.
-
Ariel Shtul authored
redis-check-rdb was unable to parse rdb files containing module aux data. Co-authored-by:
Oran Agra <oran@redislabs.com>
-
Wang Yuan authored
When all replicas waiting for a bgsave get disconnected (possibly due to output buffer limit), It may be good to kill the bgsave child. in diskless replication it already happens, but in disk-based, the child may still serve some purpose (for persistence). By killing the child, we prevent it from eating COW memory in vain, and we also allow a new child fork sooner for the next full synchronization or bgsave. We do that only if rdb persistence wasn't enabled in the configuration. Btw, now, rdbRemoveTempFile in killRDBChild won't block server, so we can killRDBChild safely.
-
Wen Hui authored
This commit adds streamIteratorStop call in rewriteStreamObject function in some of the return statement. Although currently this will not cause memory leak since stream id is only 16 bytes long.
-
- 21 Sep, 2020 5 commits
-
-
YoongHM authored
Change `val` to `unsigned char` before being tested. The fix is identical to the one that's been made in upstream jemalloc. warning is: src/malloc_io.c: In function ‘malloc_vsnprintf’: src/malloc_io.c:369:2: warning: case label value exceeds maximum value for type 369 | case '?' | 0x80: \ | ^~~~ src/malloc_io.c:581:5: note: in expansion of macro ‘GET_ARG_NUMERIC’ 581 | GET_ARG_NUMERIC(val, 'p'); | ^~~~~~~~~~~~~~~
-
YoongHM authored
jemalloc configure shows this: configure: WARNING: unrecognized options: --enable-cc-silence The changelog of jemalloc 4.0 has: - Replace --enable-cc-silence with --disable-cc-silence to suppress spurious warnings by default.
-
WuYunlong authored
Refine comment of makeThreadKillable(). This commit can be backported to 5.0, only if we also backport 8b70cb0e . Co-authored-by:
Oran Agra <oran@redislabs.com>
-
- 20 Sep, 2020 2 commits