diff options
author | Eduardo Semprebon <eduardobr@gmail.com> | 2022-04-26 13:34:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 14:34:04 +0300 |
commit | 3a1d14259d5a1cec90a5afa50a49e4d9d881ab37 (patch) | |
tree | 14b7aceb14bf0f4f8185276ac4891fd2c98f3630 /redis.conf | |
parent | 156836bfe500a2dce9319fdba259d40735421a38 (diff) | |
download | redis-3a1d14259d5a1cec90a5afa50a49e4d9d881ab37.tar.gz |
Allow configuring signaled shutdown flags (#10594)
The SHUTDOWN command has various flags to change it's default behavior,
but in some cases establishing a connection to redis is complicated and it's easier
for the management software to use signals. however, so far the signals could only
trigger the default shutdown behavior.
Here we introduce the option to control shutdown arguments for SIGTERM and SIGINT.
New config options:
`shutdown-on-sigint [nosave | save] [now] [force]`
`shutdown-on-sigterm [nosave | save] [now] [force]`
Implementation:
Support MULTI_ARG_CONFIG on createEnumConfig to support multiple enums to be applied as bit flags.
Co-authored-by: Oran Agra <oran@redislabs.com>
Diffstat (limited to 'redis.conf')
-rw-r--r-- | redis.conf | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/redis.conf b/redis.conf index 62062b397..7635c14b4 100644 --- a/redis.conf +++ b/redis.conf @@ -1527,6 +1527,22 @@ aof-timestamp-enabled no # # shutdown-timeout 10 +# When Redis receives a SIGINT or SIGTERM, shutdown is initiated and by default +# an RDB snapshot is written to disk in a blocking operation if save points are configured. +# The options used on signaled shutdown can include the following values: +# default: Saves RDB snapshot only if save points are configured. +# Waits for lagging replicas to catch up. +# save: Forces a DB saving operation even if no save points are configured. +# nosave: Prevents DB saving operation even if one or more save points are configured. +# now: Skips waiting for lagging replicas. +# force: Ignores any errors that would normally prevent the server from exiting. +# +# Any combination of values is allowed as long as "save" and "nosave" are not set simultaneously. +# Example: "nosave force now" +# +# shutdown-on-sigint default +# shutdown-on-sigterm default + ################ NON-DETERMINISTIC LONG BLOCKING COMMANDS ##################### # Maximum time in milliseconds for EVAL scripts, functions and in some cases |