mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
ac84b1cd82
Creating fork (or even a foreground SAVE) during a transaction breaks the atomicity of the transaction. In addition to that, it could mess up the propagated transaction to the AOF file. This change blocks SAVE, PSYNC, SYNC and SHUTDOWN from being executed inside MULTI-EXEC. It does that by adding a command flag, so that modules can flag their commands with that flag too. Besides it changes BGSAVE, BGREWRITEAOF, and CONFIG SET appendonly, to turn the scheduled flag instead of forking righ taway. Other changes: * expose `protected`, `no-async-loading`, and `no_multi` flags in COMMAND command * add a test to validate propagation of FLUSHALL inside a transaction. * add a test to validate how CONFIG SET that errors reacts in a transaction Co-authored-by: Oran Agra <oran@redislabs.com>
17 lines
413 B
JSON
17 lines
413 B
JSON
{
|
|
"SAVE": {
|
|
"summary": "Synchronously save the dataset to disk",
|
|
"complexity": "O(N) where N is the total number of keys in all databases",
|
|
"group": "server",
|
|
"since": "1.0.0",
|
|
"arity": 1,
|
|
"function": "saveCommand",
|
|
"command_flags": [
|
|
"NO_ASYNC_LOADING",
|
|
"ADMIN",
|
|
"NOSCRIPT",
|
|
"NO_MULTI"
|
|
]
|
|
}
|
|
}
|