redis / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.

Home Page:http://redis.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] redis cluster can not failover

dormanze opened this issue · comments

Describe the bug
redis version: 6.2.7
redis cluster nodes:9(each have 1 replica)
I stop a primary shard and its corresponding replica shard, and then start the replica shard. After 20 minutes, the replica shard is not promoted to the primary shard.
error message:

1209:S 25 Apr 2024 15:02:30.462 * Connecting to MASTER 192.168.24.44:28800
1209:S 25 Apr 2024 15:02:30.462 * MASTER <-> REPLICA sync started
1209:S 25 Apr 2024 15:02:30.462 # Error condition on socket for SYNC: (null)

To reproduce
After the primary shard and its replica shard are stopped at the same time, only the replica shard is started, and the replica shard will never be automatically promoted to the primary shard.

Expected behavior

The replica shard is automatically promoted to primary.

Additional information

How many other instances of redis are online at the restart of the replica ? Is there enought other instance to acknowledge that it is the master that disappears from cluster ? Because without other instances to agree, the replica can be the one that is partitionned and should not become the master