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

Function clusterLookupNode

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

Node lookup by name */

Source from the content-addressed store, hash-verified

1023
1024/* Node lookup by name */
1025clusterNode *clusterLookupNode(const char *name) {
1026 sds s = sdsnewlen(name, CLUSTER_NAMELEN);
1027 dictEntry *de;
1028
1029 de = dictFind(server.cluster->nodes,s);
1030 sdsfree(s);
1031 if (de == NULL) return NULL;
1032 return dictGetVal(de);
1033}
1034
1035/* This is only used after the handshake. When we connect a given IP/PORT
1036 * as a result of CLUSTER MEET we don't have the node name yet, so we

Callers 6

clusterLoadConfigFunction · 0.85
clusterProcessPacketFunction · 0.85
clusterCommandFunction · 0.85
RM_GetClusterNodeInfoFunction · 0.85

Calls 3

sdsnewlenFunction · 0.85
sdsfreeFunction · 0.85
dictFindFunction · 0.70

Tested by

no test coverage detected