summaryrefslogtreecommitdiff
path: root/src/cluster.h
diff options
context:
space:
mode:
authorHarkrishn Patro <harkrisp@amazon.com>2023-02-02 09:06:24 -0800
committerGitHub <noreply@github.com>2023-02-02 09:06:24 -0800
commitfd3975684a8e9e45c77d3b14cb1883572956efe7 (patch)
tree258997a6a9e7651b0b03f3004752aead857aca0b /src/cluster.h
parent023ff42f9853632b94e1fff0e99f0b85ae110ebe (diff)
downloadredis-fd3975684a8e9e45c77d3b14cb1883572956efe7.tar.gz
Propagate message to a node only if the cluster link is healthy. (#11752)
Currently while a sharded pubsub message publish tries to propagate the message across the cluster, a NULL check is missing for clusterLink. clusterLink could be NULL if the link is causing memory beyond the set threshold cluster-link-sendbuf-limit and server terminates the link. This change introduces two things: Avoids the engine crashes on the publishing node if a message is tried to be sent to a node and the link is NULL. Adds a debugging tool CLUSTERLINK KILL to terminate the clusterLink between two nodes.
Diffstat (limited to 'src/cluster.h')
-rw-r--r--src/cluster.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cluster.h b/src/cluster.h
index f3e8e32c6..cabc9273f 100644
--- a/src/cluster.h
+++ b/src/cluster.h
@@ -424,5 +424,6 @@ void clusterUpdateMyselfHostname(void);
void clusterUpdateMyselfAnnouncedPorts(void);
sds clusterGenNodesDescription(int filter, int use_pport);
sds genClusterInfoString();
+void freeClusterLink(clusterLink *link);
#endif /* __CLUSTER_H */