MCPcopy Create free account
hub / github.com/F-Stack/f-stack / clusterAddNode

Function clusterAddNode

app/redis-6.2.6/src/cluster.c:976–982  ·  view source on GitHub ↗

Add a node to the nodes hash table */

Source from the content-addressed store, hash-verified

974
975/* Add a node to the nodes hash table */
976void clusterAddNode(clusterNode *node) {
977 int retval;
978
979 retval = dictAdd(server.cluster->nodes,
980 sdsnewlen(node->name,CLUSTER_NAMELEN), node);
981 serverAssert(retval == DICT_OK);
982}
983
984/* Remove a node from the cluster. The function performs the high level
985 * 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