@@ -49,19 +49,22 @@ typedef struct clusterLink {
4949#define linkSupportsExtension (link ) ((link)->flags & CLUSTER_LINK_EXTENSIONS_SUPPORTED)
5050
5151/* Cluster node flags and macros. */
52- #define CLUSTER_NODE_PRIMARY (1 << 0) /* The node is a primary */
53- #define CLUSTER_NODE_REPLICA (1 << 1) /* The node is a replica */
54- #define CLUSTER_NODE_PFAIL (1 << 2) /* Failure? Need acknowledge */
55- #define CLUSTER_NODE_FAIL (1 << 3) /* The node is believed to be malfunctioning */
56- #define CLUSTER_NODE_MYSELF (1 << 4) /* This node is myself */
57- #define CLUSTER_NODE_HANDSHAKE (1 << 5) /* We have still to exchange the first ping */
58- #define CLUSTER_NODE_NOADDR (1 << 6) /* We don't know the address of this node */
59- #define CLUSTER_NODE_MEET (1 << 7) /* Send a MEET message to this node */
60- #define CLUSTER_NODE_MIGRATE_TO (1 << 8) /* Primary eligible for replica migration. */
61- #define CLUSTER_NODE_NOFAILOVER (1 << 9) /* Replica will not try to failover. */
62- #define CLUSTER_NODE_EXTENSIONS_SUPPORTED (1 << 10) /* This node supports extensions. */
63- #define CLUSTER_NODE_LIGHT_HDR_PUBLISH_SUPPORTED (1 << 11) /* This node supports light message header for publish type. */
64- #define CLUSTER_NODE_LIGHT_HDR_MODULE_SUPPORTED (1 << 12) /* This node supports light message header for module type. */
52+ #define CLUSTER_NODE_PRIMARY (1 << 0) /* The node is a primary */
53+ #define CLUSTER_NODE_REPLICA (1 << 1) /* The node is a replica */
54+ #define CLUSTER_NODE_PFAIL (1 << 2) /* Failure? Need acknowledge */
55+ #define CLUSTER_NODE_FAIL (1 << 3) /* The node is believed to be malfunctioning */
56+ #define CLUSTER_NODE_MYSELF (1 << 4) /* This node is myself */
57+ #define CLUSTER_NODE_HANDSHAKE (1 << 5) /* We have still to exchange the first ping */
58+ #define CLUSTER_NODE_NOADDR (1 << 6) /* We don't know the address of this node */
59+ #define CLUSTER_NODE_MEET (1 << 7) /* Send a MEET message to this node */
60+ #define CLUSTER_NODE_MIGRATE_TO (1 << 8) /* Primary eligible for replica migration. */
61+ #define CLUSTER_NODE_NOFAILOVER (1 << 9) /* Replica will not try to failover. */
62+ #define CLUSTER_NODE_EXTENSIONS_SUPPORTED (1 << 10) /* This node supports extensions. */
63+ #define CLUSTER_NODE_LIGHT_HDR_PUBLISH_SUPPORTED (1 << 11) /* This node supports light message header for publish type. */
64+ #define CLUSTER_NODE_LIGHT_HDR_MODULE_SUPPORTED (1 << 12) /* This node supports light message header for module type. */
65+ #define CLUSTER_NODE_MULTI_MEET_SUPPORTED CLUSTER_NODE_LIGHT_HDR_MODULE_SUPPORTED /* This node handles multi meet packet. \
66+ Light hdr for module and multi meet were both introduced in 8.1, \
67+ so we could reduce the same flag value. */
6568#define CLUSTER_NODE_NULL_NAME \
6669 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" \
6770 "\000\000\000\000\000\000\000\000\000\000\000\000"
@@ -75,6 +78,7 @@ typedef struct clusterLink {
7578#define nodeFailed (n ) ((n)->flags & CLUSTER_NODE_FAIL)
7679#define nodeCantFailover (n ) ((n)->flags & CLUSTER_NODE_NOFAILOVER)
7780#define nodeSupportsExtensions (n ) ((n)->flags & CLUSTER_NODE_EXTENSIONS_SUPPORTED)
81+ #define nodeSupportsMultiMeet (n ) ((n)->flags & CLUSTER_NODE_MULTI_MEET_SUPPORTED)
7882#define nodeInNormalState (n ) (!((n)->flags & (CLUSTER_NODE_HANDSHAKE | CLUSTER_NODE_MEET | CLUSTER_NODE_PFAIL | CLUSTER_NODE_FAIL)))
7983
8084/* Cluster messages header */
0 commit comments