1
0
mirror of https://github.com/fluencelabs/redis synced 2025-07-28 15:01:57 +00:00

Cluster: new option to work with partial slots coverage.

This commit is contained in:
antirez
2014-09-17 11:10:09 +02:00
parent fbaa438830
commit d4c3c1248f
6 changed files with 40 additions and 6 deletions

@@ -3171,12 +3171,14 @@ void clusterUpdateState(void) {
new_state = REDIS_CLUSTER_OK;
/* Check if all the slots are covered. */
for (j = 0; j < REDIS_CLUSTER_SLOTS; j++) {
if (server.cluster->slots[j] == NULL ||
server.cluster->slots[j]->flags & (REDIS_NODE_FAIL))
{
new_state = REDIS_CLUSTER_FAIL;
break;
if (server.cluster_require_full_coverage) {
for (j = 0; j < REDIS_CLUSTER_SLOTS; j++) {
if (server.cluster->slots[j] == NULL ||
server.cluster->slots[j]->flags & (REDIS_NODE_FAIL))
{
new_state = REDIS_CLUSTER_FAIL;
break;
}
}
}