diff options
author | Madelyn Olson <34459052+madolson@users.noreply.github.com> | 2022-04-26 03:25:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 13:25:33 +0300 |
commit | 6fa8e4f7afcbd14748c736c38e5fbc117eaef7ba (patch) | |
tree | e74b7ddf889b99daadd615cbee5ca069e14c82bb /redis.conf | |
parent | efcd1bf394668e418df1a93cd28cf9e8b0c09ce5 (diff) | |
download | redis-6fa8e4f7afcbd14748c736c38e5fbc117eaef7ba.tar.gz |
Set replicas to panic on disk errors, and optionally panic on replication errors (#10504)
* Till now, replicas that were unable to persist, would still execute the commands
they got from the master, now they'll panic by default, and we add a new
`replica-ignore-disk-errors` config to change that.
* Till now, when a command failed on a replica or AOF-loading, it only logged a
warning and a stat, we add a new `propagation-error-behavior` config to allow
panicking in that state (may become the default one day)
Note that commands that fail on the replica can either indicate a bug that could
cause data inconsistency between the replica and the master, or they could be
in some cases (specifically in previous versions), a result of a command (e.g. EVAL)
that failed on the master, but still had to be propagated to fail on the replica as well.
Diffstat (limited to 'redis.conf')
-rw-r--r-- | redis.conf | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/redis.conf b/redis.conf index d2074f13f..62062b397 100644 --- a/redis.conf +++ b/redis.conf @@ -728,6 +728,31 @@ repl-disable-tcp-nodelay no # By default the priority is 100. replica-priority 100 +# The propagation error behavior controls how Redis will behave when it is +# unable to handle a command being processed in the replication stream from a master +# or processed while reading from an AOF file. Errors that occur during propagation +# are unexpected, and can cause data inconsistency. However, there are edge cases +# in earlier versions of Redis where it was possible for the server to replicate or persist +# commands that would fail on future versions. For this reason the default behavior +# is to ignore such errors and continue processing commands. +# +# If an application wants to ensure there is no data divergence, this configuration +# should be set to 'panic' instead. The value can also be set to 'panic-on-replicas' +# to only panic when a replica encounters an error on the replication stream. One of +# these two panic values will become the default value in the future once there are +# sufficient safety mechanisms in place to prevent false positive crashes. +# +# propagation-error-behavior ignore + +# Replica ignore disk write errors controls the behavior of a replica when it is +# unable to persist a write command received from its master to disk. By default, +# this configuration is set to 'no' and will crash the replica in this condition. +# It is not recommended to change this default, however in order to be compatible +# with older versions of Redis this config can be toggled to 'yes' which will just +# log a warning and execute the write command it got from the master. +# +# replica-ignore-disk-write-errors no + # ----------------------------------------------------------------------------- # By default, Redis Sentinel includes all replicas in its reports. A replica # can be excluded from Redis Sentinel's announcements. An unannounced replica |