diff --git a/src/cluster_legacy.c b/src/cluster_legacy.c index 035b9fc876..f424b2ab2c 100644 --- a/src/cluster_legacy.c +++ b/src/cluster_legacy.c @@ -2996,7 +2996,10 @@ int clusterProcessPacket(clusterLink *link) { /* Add this node if it is new for us and the msg type is MEET. * In this stage we don't try to add the node with the right * flags, replicaof pointer, and so forth, as this details will be - * resolved when we'll receive PONGs from the node. */ + * resolved when we'll receive PONGs from the node. The exception + * to this is the flag that indicates extensions are supported, as + * we want to send extensions right away in the return PONG in order + * to reduce the amount of time needed to stabilize the shard ID */ if (!sender && type == CLUSTERMSG_TYPE_MEET) { clusterNode *node; @@ -3004,6 +3007,9 @@ int clusterProcessPacket(clusterLink *link) { serverAssert(nodeIp2String(node->ip, link, hdr->myip) == C_OK); getClientPortFromClusterMsg(hdr, &node->tls_port, &node->tcp_port); node->cport = ntohs(hdr->cport); + if (hdr->mflags[0] & CLUSTERMSG_FLAG0_EXT_DATA) { + node->flags |= CLUSTER_NODE_EXTENSIONS_SUPPORTED; + } clusterAddNode(node); clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG); }