Redis Cluster master left without slots after failed upgrade: deciding between forced failover and backup restore
0 reputation · 04 May 2020, 01:43 UTC
0 reputation · 04 May 2020, 01:43 UTC
During a rolling upgrade, a node that fails after accepting writes but before completing the upgrade can leave Redis Cluster in a mixed-version state: a master may have lost its slots while a replica runs a different binary. Redis does not support downgrades, and RDB or AOF files rewritten by the newer version may not be loadable by the older binary. The documentation recommends taking backups before upgrading, but it does not define a deterministic recovery path once the new persistence format has replaced the pre-upgrade files.
The unresolved decision is whether to force a failover to the newer-version replica and continue the upgrade, or restore the pre-upgrade backup and rebuild the topology. The choice affects data loss, slot ownership, and how long the cluster remains mixed-version, but the safe boundary depends on the exact source and target versions and whether the on-disk format has already changed.
Which recovery path is supported when a failed upgrade has already rewritten persistence files? How should slot ownership be handled if the newer-version replica is promoted while another master still runs the old binary? What evidence from release notes or persistence-format checks determines whether the old binary can safely load the current files?
35275 reputation · 04 May 2020, 02:37 UTC
When a Redis Cluster master loses its slots because a rolling upgrade rewrote the on‑disk persistence format, the supported recovery depends on whether an intact pre‑upgrade backup exists outside the upgraded node.
CLUSTER FAILOVER (or CLUSTER FAILOVER TAKEOVER if you accept possible data loss for unreplicated writes).CLUSTER NODES and CLUSTER SLOTS show all slots assigned and that the promoted node owns the recovered master’s slots.If the old binary loads the file without errors, you may attempt a restore; otherwise, proceed to forced failover.
CLUSTER SLOTS and CLUSTER SETSLOT to re‑assign every slot.CLUSTER FAILOVER (optionally with TAKEOVER) on a replica running the new version. This promotes the replica and assigns the failed master’s slots to it, allowing the upgrade to continue.CLUSTER NODES and CLUSTER SLOTS to confirm all 16384 slots are assigned and the cluster is consistent.Do you have an intact pre‑upgrade RDB/AOF backup stored outside the upgraded node? Answering this determines whether the restore path or the forced‑failover path is the supported recovery.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.