- 06 Oct, 2020 1 commit
-
-
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.
-
- 05 Oct, 2020 2 commits
-
-
Wen Hui authored
-
Oran Agra authored
track and report memory used by clients argv. this is very usaful in case clients started sending a command and didn't complete it. in which case the first args of the command are already trimmed from the query buffer. in an effort to avoid cache misses and overheads while keeping track of these, i avoid calling sdsZmallocSize and instead use the sdslen / bulk-len which can at least give some insight into the problem. This memory is now added to the total clients memory usage, as well as the client list.
-
- 04 Oct, 2020 2 commits
-
-
Oran Agra authored
-
DvirDukhan authored
Adding -D option for redis-cli to control newline between command responses in raw mode. Also removing cleanup code before calling exit, just in order to avoid adding more adding more cleanup code (redis doesn't bother to release allocations before exit anyway) Co-authored-by:
Oran Agra <oran@redislabs.com>
-
- 02 Oct, 2020 2 commits
-
-
Nykolas Laurentino de Lima authored
Add optional GET parameter to SET command in order to set a new value to a key and retrieve the old key value. With this change we can deprecate `GETSET` command and use only the SET command with the GET parameter.
-
Oran Agra authored
This commit has two aspects: 1) improve memory reporting for all the places that use sdsAllocSize to compute memory used by a string, in this case it'll include the internal fragmentation. 2) reduce the need for realloc calls by making the sds implicitly take over the internal fragmentation of the block it allocated.
-
- 01 Oct, 2020 3 commits
-
-
Oran Agra authored
The MEMORY command is used for debugging memory usage, so it should include internal fragmentation, same as used_memory
-
Oran Agra authored
-
Rafi Einstein authored
-
- 30 Sep, 2020 2 commits
-
-
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 5 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.
-
Oran Agra authored
-
David CARLIER authored
-
Gavrie Philipson authored
-
David CARLIER authored
-
- 28 Sep, 2020 1 commit
-
-
WuYunlong authored
-
- 27 Sep, 2020 2 commits
-
-
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 1 commit
-