Commit abe81781 authored by antirez's avatar antirez
Browse files

Cluster: FAIL messages from unknown senders are handled better.

Previously the event was not logged but instead the node reported an
unknown packet type received.
parent 7970ebd8
...@@ -1154,9 +1154,10 @@ int clusterProcessPacket(clusterLink *link) { ...@@ -1154,9 +1154,10 @@ int clusterProcessPacket(clusterLink *link) {
/* Update the cluster state if needed */ /* Update the cluster state if needed */
if (update_state) clusterUpdateState(); if (update_state) clusterUpdateState();
if (update_config) clusterSaveConfigOrDie(); if (update_config) clusterSaveConfigOrDie();
} else if (type == CLUSTERMSG_TYPE_FAIL && sender) { } else if (type == CLUSTERMSG_TYPE_FAIL) {
clusterNode *failing; clusterNode *failing;
if (sender) {
failing = clusterLookupNode(hdr->data.fail.about.nodename); failing = clusterLookupNode(hdr->data.fail.about.nodename);
if (failing && !(failing->flags & (REDIS_NODE_FAIL|REDIS_NODE_MYSELF))) if (failing && !(failing->flags & (REDIS_NODE_FAIL|REDIS_NODE_MYSELF)))
{ {
...@@ -1169,6 +1170,11 @@ int clusterProcessPacket(clusterLink *link) { ...@@ -1169,6 +1170,11 @@ int clusterProcessPacket(clusterLink *link) {
clusterUpdateState(); clusterUpdateState();
clusterSaveConfigOrDie(); clusterSaveConfigOrDie();
} }
} else {
redisLog(REDIS_NOTICE,
"Ignoring FAIL message from unknonw node %.40s about %.40s",
hdr->sender, hdr->data.fail.about.nodename);
}
} else if (type == CLUSTERMSG_TYPE_PUBLISH) { } else if (type == CLUSTERMSG_TYPE_PUBLISH) {
robj *channel, *message; robj *channel, *message;
uint32_t channel_len, message_len; uint32_t channel_len, message_len;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment