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

Function clusterSendFail

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

Send a FAIL message to all the nodes we are able to contact. * The FAIL message is sent when we detect that a node is failing * (CLUSTER_NODE_PFAIL) and we also receive a gossip confirmation of this: * we switch the node state to CLUSTER_NODE_FAIL and ask all the other * nodes to do the same ASAP. */

Source from the content-addressed store, hash-verified

2749 * we switch the node state to CLUSTER_NODE_FAIL and ask all the other
2750 * nodes to do the same ASAP. */
2751void clusterSendFail(char *nodename) {
2752 clusterMsg buf[1];
2753 clusterMsg *hdr = (clusterMsg*) buf;
2754
2755 clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_FAIL);
2756 memcpy(hdr->data.fail.about.nodename,nodename,CLUSTER_NAMELEN);
2757 clusterBroadcastMessage(buf,ntohl(hdr->totlen));
2758}
2759
2760/* Send an UPDATE message to the specified link carrying the specified 'node'
2761 * slots configuration. The node name, slots bitmap, and configEpoch info

Callers 1

Calls 3

clusterBuildMessageHdrFunction · 0.85
clusterBroadcastMessageFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected