mirror of
https://github.com/redis/redis.git
synced 2026-04-21 03:01:35 -04:00
Some modules might perform a long-running logic in different stages of Redis lifetime, for example: * command execution * RDB loading * thread safe context During this long-running logic Redis is not responsive. This PR offers 1. An API to process events while a busy command is running (`RM_Yield`) 2. A new flag (`ALLOW_BUSY`) to mark the commands that should be handled during busy jobs which can also be used by modules (`allow-busy`) 3. In slow commands and thread safe contexts, this flag will start rejecting commands with -BUSY only after `busy-reply-threshold` 4. During loading (`rdb_load` callback), it'll process events right away (not wait for `busy-reply-threshold`), but either way, the processing is throttled to the server hz rate. 5. Allow modules to Yield to redis background tasks, but not to client commands * rename `script-time-limit` to `busy-reply-threshold` (an alias to the pre-7.0 `lua-time-limit`) Co-authored-by: Oran Agra <oran@redislabs.com>
21 lines
445 B
JSON
21 lines
445 B
JSON
{
|
|
"MULTI": {
|
|
"summary": "Mark the start of a transaction block",
|
|
"complexity": "O(1)",
|
|
"group": "transactions",
|
|
"since": "1.2.0",
|
|
"arity": 1,
|
|
"function": "multiCommand",
|
|
"command_flags": [
|
|
"NOSCRIPT",
|
|
"LOADING",
|
|
"STALE",
|
|
"FAST",
|
|
"ALLOW_BUSY"
|
|
],
|
|
"acl_categories": [
|
|
"TRANSACTION"
|
|
]
|
|
}
|
|
}
|