diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2020-03-21 10:28:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-07 11:16:53 +0000 |
commit | 06cba6ccd165ca8b224797e37fccb9e63f026d77 (patch) | |
tree | e82f1bc439997ae296f2e74f8a64d84c5d95f140 /iredis/data/commands/cluster-set-config-epoch.md | |
parent | Initial commit. (diff) | |
download | iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.tar.xz iredis-06cba6ccd165ca8b224797e37fccb9e63f026d77.zip |
Adding upstream version 1.9.1.upstream/1.9.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iredis/data/commands/cluster-set-config-epoch.md')
-rw-r--r-- | iredis/data/commands/cluster-set-config-epoch.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/iredis/data/commands/cluster-set-config-epoch.md b/iredis/data/commands/cluster-set-config-epoch.md new file mode 100644 index 0000000..b64fffa --- /dev/null +++ b/iredis/data/commands/cluster-set-config-epoch.md @@ -0,0 +1,25 @@ +This command sets a specific _config epoch_ in a fresh node. It only works when: + +1. The nodes table of the node is empty. +2. The node current _config epoch_ is zero. + +These prerequisites are needed since usually, manually altering the +configuration epoch of a node is unsafe, we want to be sure that the node with +the higher configuration epoch value (that is the last that failed over) wins +over other nodes in claiming the hash slots ownership. + +However there is an exception to this rule, and it is when a new cluster is +created from scratch. Redis Cluster _config epoch collision resolution_ +algorithm can deal with new nodes all configured with the same configuration at +startup, but this process is slow and should be the exception, only to make sure +that whatever happens, two more nodes eventually always move away from the state +of having the same configuration epoch. + +So, using `CONFIG SET-CONFIG-EPOCH`, when a new cluster is created, we can +assign a different progressive configuration epoch to each node before joining +the cluster together. + +@return + +@simple-string-reply: `OK` if the command was executed successfully, otherwise +an error is returned. |