• guybe7's avatar
    Ban snapshot-creating commands and other admin commands from transactions (#10015) · ac84b1cd
    guybe7 authored
    
    
    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: default avatarOran Agra <oran@redislabs.com>
    ac84b1cd
rdb.c 131 KB