mirror of
https://github.com/fluencelabs/redis
synced 2025-03-21 01:50:50 +00:00
Cluster: don't perform startup slots sanity check for slaves.
If we are a cluster node the DB content will not match our configured slots. Don't do the check at all.
This commit is contained in:
parent
d334897e80
commit
d6457577d4
@ -1464,6 +1464,10 @@ int verifyClusterConfigWithData(void) {
|
|||||||
int j;
|
int j;
|
||||||
int update_config = 0;
|
int update_config = 0;
|
||||||
|
|
||||||
|
/* If this node is a slave, don't perform the check at all as we
|
||||||
|
* completely depend on the replication stream. */
|
||||||
|
if (server.cluster->myself->flags & REDIS_NODE_SLAVE) return REDIS_OK;
|
||||||
|
|
||||||
/* Make sure we only have keys in DB0. */
|
/* Make sure we only have keys in DB0. */
|
||||||
for (j = 1; j < server.dbnum; j++) {
|
for (j = 1; j < server.dbnum; j++) {
|
||||||
if (dictSize(server.db[j].dict)) return REDIS_ERR;
|
if (dictSize(server.db[j].dict)) return REDIS_ERR;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user