- 13 Jun, 2023 2 commits
-
-
Harkrishn Patro authored
It would be helpful for clients to get cluster slots/shards information during a node failover and is loading data.
-
Binbin authored
For the XREADGROUP BLOCK > scenario, there is an endless loop. Due to #11012, it keep going, reprocess command -> blockForKeys -> reprocess command The right fix is to avoid an endless loop in handleClientsBlockedOnKey and handleClientsBlockedOnKeys, looks like there was some attempt in handleClientsBlockedOnKeys but maybe not sufficiently good, and it looks like using a similar trick in handleClientsBlockedOnKey is complicated. i.e. stashing the list on the stack and iterating on it after creating a fresh one for future use, is problematic since the code keeps accessing the global list. Co-authored-by:
Oran Agra <oran@redislabs.com>
-
- 12 Jun, 2023 1 commit
-
-
Oran Agra authored
This will increase the size of an already large COB (one already passed the threshold for disconnection) This could also mean that we'll attempt to write that data to the socket and the replica will manage to read it, which will result in an undesired partial sync (undesired for the test)
-
- 11 Jun, 2023 2 commits
-
-
YaacovHazan authored
In 7.2, After 971b177f we make sure (assert) that the duration has been recorded when resetting the client. This is not true for rejected commands. The use case I found is a blocking command that an ACL rule changed before it was unblocked, and while reprocessing it, the command rejected and triggered the assert. The PR reset the command duration inside rejectCommand / rejectCommandSds. Co-authored-by:
Oran Agra <oran@redislabs.com>
-
Binbin authored
This leak will only happen in loadServerConfigFromString, that is, when we are loading a redis.conf, and the user is wrong. Because it happens in loadServerConfigFromString, redis will exit if there is an error, so this is actually just a cleanup.
-
- 08 Jun, 2023 1 commit
-
-
Binbin authored
We now no longer propagate scripts (started from 7.0), so this is a very rare issue that in nearly-dead-code. This is an overlook in #9780
-
- 05 Jun, 2023 1 commit
-
-
Yossi Gottlieb authored
Adding this as it's required by the latest version of libmusl (but not clear if it's a regression or an intentional change).
-
- 30 May, 2023 1 commit
-
-
Oran Agra authored
This is a followup fix for #11817
-
- 29 May, 2023 2 commits
-
-
Binbin authored
We should emit DB_FLAG_KEY_EXPIRED instead of DB_FLAG_KEY_DELETED. This is an overlook in #9406.
-
Binbin authored
Try lazyfree temp zset in ZUNION / ZINTER / ZDIFF and optimize ZINTERCARD to avoid create temp zset (#12229) We check lazyfree_lazy_server_del in sunionDiffGenericCommand to see if we need to lazyfree the temp set. Now do the same in zunionInterDiffGenericCommand to lazyfree the temp zset. This is a minor change, follow #5903. Also improved the comments. Additionally, avoid creating unused zset object in ZINTERCARD, results in some 10% performance improvement.
-
- 28 May, 2023 5 commits
-
-
Oran Agra authored
This is a redo of #11594 which got reverted in #11940 It improves performance by avoiding double lookup of the the key.
-
Oran Agra authored
So far clients being blocked and unblocked by a module command would update the c->woff variable and so WAIT was ineffective and got released without waiting for the command actions to propagate. This seems to have existed since forever, but not for RM_BlockClientOnKeys. It is problematic though to know if the module did or didn't propagate anything in that command, so for now, instead of adding an API, we'll just update the woff to the latest offset when unblocking, this will cause the client to possibly wait excessively, but that's not that bad.
-
David CARLIER authored
-
Wen Hui authored
XREAD only supports a special ID of $ and XREADGROUP only supports ^. make sure not to suggest the wrong one when rerunning an error about unbalanced ID arguments Co-authored-by:
Oran Agra <oran@redislabs.com>
-
zhenwei pi authored
Rather than a fixed iovcnt for connWritev, support maxiov per connection type instead. A minor change to reduce memory for struct connection. Signed-off-by:
zhenwei pi <pizhenwei@bytedance.com>
-
- 26 May, 2023 1 commit
-
-
Binbin authored
It was missing in #12223, and the reply-schemas daily was failing: ``` jsonschema.exceptions.ValidationError: 'nothing' is not valid under any of the given schemas Failed validating 'oneOf' in schema[0]['properties']['loglevel']: {'oneOf': [{'const': 'debug'}, {'const': 'verbose'}, {'const': 'notice'}, {'const': 'warning'}, {'const': 'unknown'}]} On instance['loglevel']: 'nothing' ```
-
- 24 May, 2023 5 commits
-
-
mojh7 authored
functoin -> function
-
Oran Agra authored
The light version only shows the table sizes, while the pre-existing version that shows chain length stats is reachable with the `full` argument. This should allow looking into rehashing state, even on huge dicts, on which we're afraid to run the command for fear of causing a server freeze. Also, fix a possible overflow in dictGetStats.
-
Oran Agra authored
and update recent SENTINEL CONFIG changes.
-
judeng authored
postpone the initialization of oject's lru&lfu until it is added to the db as a value object (#11626) This pr can get two performance benefits: 1. Stop redundant initialization when most robj objects are created 2. LRU_CLOCK will no longer be called in io threads, so we can avoid the `atomicGet` Another code optimization: deleted the redundant judgment in dbSetValue, no matter in LFU or LRU, the lru field inold robj is always the freshest (it is always updated in lookupkey), so we don't need to judge if in LFU
-
Binbin authored
We add a new loglevel 'nothing' to disable logging in #12133. This PR syncs that config change to sentinel. Because in #11214 we support modifying loglevel in runtime. Although I think sentinel doesn't need this nothing config, it's better to be consistent.
-
- 23 May, 2023 3 commits
-
-
Ping Xie authored
This commit excludes aux fields from the output of the `cluster nodes` and `cluster replicas` command. We may decide to re-introduce them in some form or another in the future, but not in v7.2.
-
zhaozhao.zz authored
Users can record logs of different levels by setting the `loglevel`. However, sometimes there are many logs even at the warning level, which can affect the performance of Redis. For example, when a user accesses the tls-port using a non-encrypted link, Redis will log lots of "# Error accepting a client connection: ...". We can provide the ability to disable logging so that users can temporarily turn off logging and turn it back on after the problem is resolved.
-
Shaya Potter authored
previously the argv wasn't freed so would leak. not a common case, but should be handled. Solution: move RUN_AS_USER setup and error exit to the right place. this way, when we do `goto cleanup` (instead of return) it'll automatically do the right thing (including autoMemoryAdd) Removed the user argument from moduleAllocTempClient (reverted to the state before 6e993a5d ) Co-authored-by:
Oran Agra <oran@redislabs.com>
-
- 22 May, 2023 2 commits
-
-
Binbin authored
Optimized HRANDFIELD and ZRANDMEMBER commands as in #8444, CASE 3 under listpack encoding. Boost optimization to CASE 2.5. CASE 2.5 listpack only. Sampling unique elements, in non-random order. Listpack encoded hashes / zsets are meant to be relatively small, so HRANDFIELD_SUB_STRATEGY_MUL / ZRANDMEMBER_SUB_STRATEGY_MUL isn't necessary and we rather not make copies of the entries. Instead, we emit them directly to the output buffer. Simple benchmarks shows it provides some 400% improvement in HRANDFIELD and ZRANGESTORE both in CASE 3. Unrelated changes: remove useless setTypeRandomElements and fix a typo.
-
binfeng-xin authored
A single SPOP with command with count argument resulted in many SPOP commands being propagated to the replica. This is inefficient because the key name is repeated many times, and is also being looked-up many times. also it results in high QPS metrics on the replica. To solve that, we flush batches of 1024 fields per SPOP command. Co-authored-by:
zhaozhao.zz <zhaozhao.zz@alibaba-inc.com>
-
- 18 May, 2023 3 commits
-
-
Binbin authored
Performance improvement to ZADD and ZRANGESTORE, convert to skiplist and expand dict in advance (#12185) For zsets that will eventually be stored as the skiplist encoding (has a dict), we can convert it to skiplist ahead of time. This change checks the number of arguments in the ZADD command, and converts the data-structure if the number of new entries exceeds the listpack-max-entries configuration. This can cause us to over-allocate memory if there are duplicate entries in the input, which is unexpected. For ZRANGESTORE, we know the size of the zset, so we can expand the dict in advance, to avoid the temporary dict from being rehashed while it grows. Simple benchmarks shows it provides some 4% improvement in ZADD and 20% in ZRANGESTORE
-
Brennan authored
When `replicationFeedSlaves()` serializes a command, it repeatedly calls `feedReplicationBuffer()` to feed it to the replication backlog piece by piece. It is unnecessary to call `incrementalTrimReplicationBacklog()` for every small amount of data added with `feedReplicationBuffer()` as the chance of the conditions being met for trimming are very low and these frequent calls add up to a notable performance cost. Instead, we will only attempt trimming when a new block is added to the replication backlog. Using redis-benchmark to saturate a local redis server indicated a performance improvement of around 3-3.5% for 100 byte SET commands with this change.
-
YaacovHazan authored
CMD_CALL_FROM_MODULE overlapped CMD_CALL_REPROCESSING, changing its value to (1<<3)
-
- 17 May, 2023 1 commit
-
-
Wen Hui authored
Extend SENTINEL CONFIG SET and SENTINEL CONFIG GET to be compatible with variadic CONFIG SET and CONFIG GET and allow multiple parameters to be modified in a single call atomically. Co-authored-by:
Oran Agra <oran@redislabs.com>
-
- 16 May, 2023 1 commit
-
-
Binbin authored
In the judgment in setTypeCreate, we should judge size_hint <= max_entries. This results in the following inconsistencies: ``` 127.0.0.1:6379> config set set-max-intset-entries 5 set-max-listpack-entries 5 OK 127.0.0.1:6379> sadd intset_set1 1 2 3 4 5 (integer) 5 127.0.0.1:6379> object encoding intset_set1 "hashtable" 127.0.0.1:6379> sadd intset_set2 1 2 3 4 (integer) 4 127.0.0.1:6379> sadd intset_set2 5 (integer) 1 127.0.0.1:6379> object encoding intset_set2 "intset" 127.0.0.1:6379> sadd listpack_set1 a 1 2 3 4 (integer) 5 127.0.0.1:6379> object encoding listpack_set1 "hashtable" 127.0.0.1:6379> sadd listpack_set2 a 1 2 3 (integer) 4 127.0.0.1:6379> sadd listpack_set2 4 (integer) 1 127.0.0.1:6379> object encoding listpack_set2 "listpack" ``` This was introduced in #12019, added corresponding tests.
-
- 14 May, 2023 1 commit
-
-
JJ Lu authored
Limit the range of RANK to -LONG_ MAX ~ LONG_ MAX. Without this limit, passing -9223372036854775808 would effectively be the same as passing -1.
-
- 12 May, 2023 1 commit
-
-
Chen Tianjie authored
The measured latency(duration) includes the list below, which can be shown by `INFO STATS`. ``` eventloop_cycles // ever increasing counter eventloop_duration_sum // cumulative duration of eventloop in microseconds eventloop_duration_cmd_sum // cumulative duration of executing commands in microseconds instantaneous_eventloop_cycles_per_sec // average eventloop count per second in recent 1.6s instantaneous_eventloop_duration_usec // average single eventloop duration in recent 1.6s ``` Also added some experimental metrics, which are shown only when `INFO DEBUG` is called. This section isn't included in the default INFO, or even in `INFO ALL` and the fields in this section can change in the future without considering backwards compatibility. ``` eventloop_duration_aof_sum // cumulative duration of writing AOF eventloop_duration_cron_sum // cumulative duration cron jobs (serverCron, beforeSleep excluding IO and AOF) eventloop_cmd_per_cycle_max // max number of commands executed in one eventloop eventloop_duration_max // max duration of one eventloop ``` All of these are being reset by CONFIG RESETSTAT
-
- 11 May, 2023 2 commits
- 10 May, 2023 1 commit
-
-
Binbin authored
This pattern is from COMMAND INFO: Returns information about one, multiple or all commands. Also re-generate commands.def, the GEO change was missing in #12151.
-
- 09 May, 2023 1 commit
-
-
Leibale Eidelman authored
in GEO commands, `STORE` and `STOREDIST` are mutually exclusive. use `oneof` block to contain them
-
- 08 May, 2023 3 commits
-
-
tison authored
Fix incorrect documentation about the arguments of ZRANGE commands
-
cui fliter authored
Remove several instances of duplicate "the" in comments
-
Madelyn Olson authored
For sets and hashes that will eventually be stored as the hash encoding, it's much faster to immediately convert them to their hash encoding and then perform the insertions since it avoids the O(N) search and frequent reallocations. This change checks the number of arguments in the incoming command, and converts the data-structure if the number of new entries exceeds the listpack-max-entries configuration. This can cause us to over-allocate memory if their are duplicate entries in the input, which is unexpected. unstable Summary: throughput summary: 805.54 requests per second latency summary (msec): avg min p50 p95 p99 max 61.908 25.680 68.351 73.279 75.967 79.295 hset-improvement Summary: throughput summary: 4701.46 requests per second latency summary (msec): avg min p50 p95 p99 max 10.546 0.832 11.959 12.471 13.119 14.967
-