mirror of
https://github.com/fluencelabs/redis
synced 2025-03-20 17:40:50 +00:00
Cluster: set node role on successful handshake.
This commit is contained in:
parent
cda0cdfb70
commit
34c1871e9f
@ -855,6 +855,7 @@ int clusterProcessPacket(clusterLink *link) {
|
|||||||
redisLog(REDIS_DEBUG,"Handshake with node %.40s completed.",
|
redisLog(REDIS_DEBUG,"Handshake with node %.40s completed.",
|
||||||
link->node->name);
|
link->node->name);
|
||||||
link->node->flags &= ~REDIS_NODE_HANDSHAKE;
|
link->node->flags &= ~REDIS_NODE_HANDSHAKE;
|
||||||
|
link->node->flags |= flags&(REDIS_NODE_MASTER|REDIS_NODE_SLAVE);
|
||||||
update_config = 1;
|
update_config = 1;
|
||||||
} else if (memcmp(link->node->name,hdr->sender,
|
} else if (memcmp(link->node->name,hdr->sender,
|
||||||
REDIS_CLUSTER_NAMELEN) != 0)
|
REDIS_CLUSTER_NAMELEN) != 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user