summaryrefslogtreecommitdiff
path: root/redis.conf
diff options
context:
space:
mode:
authorEduardo Semprebon <eduardobr@gmail.com>2022-09-11 10:22:59 +0200
committerGitHub <noreply@github.com>2022-09-11 11:22:59 +0300
commit36abc0fa8f50a0c5bbe8b5ddcca657d6ada94363 (patch)
treefd4f8e07ca21fa9e3dff72582b2ac3ca69276e04 /redis.conf
parent5389fa62a64ddb277a58db4b21934d47cd298028 (diff)
downloadredis-36abc0fa8f50a0c5bbe8b5ddcca657d6ada94363.tar.gz
Improve redis.conf documentation on repl-diskless-load (#11213)
Just noticed that there are some inaccurate, or at least confusing information about `repl-diskless-load` in `redis.conf` It shouldn't scare away users willing to spend the extra memory. `may mean that we have to flush the contents of the current database before the full rdb was received.`: this is likely related to the time when there was an option `always`, where content on replica was flushed before loading from master.
Diffstat (limited to 'redis.conf')
-rw-r--r--redis.conf22
1 files changed, 12 insertions, 10 deletions
diff --git a/redis.conf b/redis.conf
index 3bb52e76d..5672f3c2c 100644
--- a/redis.conf
+++ b/redis.conf
@@ -629,11 +629,10 @@ repl-diskless-sync-delay 5
repl-diskless-sync-max-replicas 0
# -----------------------------------------------------------------------------
-# WARNING: RDB diskless load is experimental. Since in this setup the replica
-# does not immediately store an RDB on disk, it may cause data loss during
-# failovers. RDB diskless load + Redis modules not handling I/O reads may also
-# cause Redis to abort in case of I/O errors during the initial synchronization
-# stage with the master. Use only if you know what you are doing.
+# WARNING: Since in this setup the replica does not immediately store an RDB on
+# disk, it may cause data loss during failovers. RDB diskless load + Redis
+# modules not handling I/O reads may cause Redis to abort in case of I/O errors
+# during the initial synchronization stage with the master.
# -----------------------------------------------------------------------------
#
# Replica can load the RDB it reads from the replication link directly from the
@@ -643,19 +642,22 @@ repl-diskless-sync-max-replicas 0
# In many cases the disk is slower than the network, and storing and loading
# the RDB file may increase replication time (and even increase the master's
# Copy on Write memory and replica buffers).
-# However, parsing the RDB file directly from the socket may mean that we have
-# to flush the contents of the current database before the full rdb was
-# received. For this reason we have the following options:
+# However, when parsing the RDB file directly from the socket, in order to avoid
+# data loss it's only safe to flush the current dataset when the new dataset is
+# fully loaded in memory, resulting in higher memory usage.
+# For this reason we have the following options:
#
# "disabled" - Don't use diskless load (store the rdb file to the disk first)
-# "on-empty-db" - Use diskless load only when it is completely safe.
# "swapdb" - Keep current db contents in RAM while parsing the data directly
# from the socket. Replicas in this mode can keep serving current
-# data set while replication is in progress, except for cases where
+# dataset while replication is in progress, except for cases where
# they can't recognize master as having a data set from same
# replication history.
# Note that this requires sufficient memory, if you don't have it,
# you risk an OOM kill.
+# "on-empty-db" - Use diskless load only when current dataset is empty. This is
+# safer and avoid having old and new dataset loaded side by side
+# during replication.
repl-diskless-load disabled
# Master send PINGs to its replicas in a predefined interval. It's possible to