MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / clusterAddNode

Function clusterAddNode

src/cluster.cpp:1015–1021  ·  view source on GitHub ↗

Add a node to the nodes hash table */

Source from the content-addressed store, hash-verified

1013
1014/* Add a node to the nodes hash table */
1015void clusterAddNode(clusterNode *node) {
1016 int retval;
1017
1018 retval = dictAdd(g_pserver->cluster->nodes,
1019 sdsnewlen(node->name,CLUSTER_NAMELEN), node);
1020 serverAssert(retval == DICT_OK);
1021}
1022
1023/* Remove a node from the cluster. The function performs the high level
1024 * cleanup, calling freeClusterNode() for the low level cleanup.

Callers 7

clusterLoadConfigFunction · 0.85
clusterInitFunction · 0.85
clusterResetFunction · 0.85
clusterRenameNodeFunction · 0.85
clusterStartHandshakeFunction · 0.85
clusterProcessPacketFunction · 0.85

Calls 2

sdsnewlenFunction · 0.85
dictAddFunction · 0.70

Tested by

no test coverage detected