@@ -41,19 +41,22 @@ typedef struct clusterLink {
4141} clusterLink ;
4242
4343/* Cluster node flags and macros. */
44- #define CLUSTER_NODE_PRIMARY (1 << 0) /* The node is a primary */
45- #define CLUSTER_NODE_REPLICA (1 << 1) /* The node is a replica */
46- #define CLUSTER_NODE_PFAIL (1 << 2) /* Failure? Need acknowledge */
47- #define CLUSTER_NODE_FAIL (1 << 3) /* The node is believed to be malfunctioning */
48- #define CLUSTER_NODE_MYSELF (1 << 4) /* This node is myself */
49- #define CLUSTER_NODE_HANDSHAKE (1 << 5) /* We have still to exchange the first ping */
50- #define CLUSTER_NODE_NOADDR (1 << 6) /* We don't know the address of this node */
51- #define CLUSTER_NODE_MEET (1 << 7) /* Send a MEET message to this node */
52- #define CLUSTER_NODE_MIGRATE_TO (1 << 8) /* Primary eligible for replica migration. */
53- #define CLUSTER_NODE_NOFAILOVER (1 << 9) /* Replica will not try to failover. */
54- #define CLUSTER_NODE_EXTENSIONS_SUPPORTED (1 << 10) /* This node supports extensions. */
55- #define CLUSTER_NODE_LIGHT_HDR_PUBLISH_SUPPORTED (1 << 11) /* This node supports light message header for publish type. */
56- #define CLUSTER_NODE_LIGHT_HDR_MODULE_SUPPORTED (1 << 12) /* This node supports light message header for module type. */
44+ #define CLUSTER_NODE_PRIMARY (1 << 0) /* The node is a primary */
45+ #define CLUSTER_NODE_REPLICA (1 << 1) /* The node is a replica */
46+ #define CLUSTER_NODE_PFAIL (1 << 2) /* Failure? Need acknowledge */
47+ #define CLUSTER_NODE_FAIL (1 << 3) /* The node is believed to be malfunctioning */
48+ #define CLUSTER_NODE_MYSELF (1 << 4) /* This node is myself */
49+ #define CLUSTER_NODE_HANDSHAKE (1 << 5) /* We have still to exchange the first ping */
50+ #define CLUSTER_NODE_NOADDR (1 << 6) /* We don't know the address of this node */
51+ #define CLUSTER_NODE_MEET (1 << 7) /* Send a MEET message to this node */
52+ #define CLUSTER_NODE_MIGRATE_TO (1 << 8) /* Primary eligible for replica migration. */
53+ #define CLUSTER_NODE_NOFAILOVER (1 << 9) /* Replica will not try to failover. */
54+ #define CLUSTER_NODE_EXTENSIONS_SUPPORTED (1 << 10) /* This node supports extensions. */
55+ #define CLUSTER_NODE_LIGHT_HDR_PUBLISH_SUPPORTED (1 << 11) /* This node supports light message header for publish type. */
56+ #define CLUSTER_NODE_LIGHT_HDR_MODULE_SUPPORTED (1 << 12) /* This node supports light message header for module type. */
57+ #define CLUSTER_NODE_MULTI_MEET_SUPPORTED CLUSTER_NODE_LIGHT_HDR_MODULE_SUPPORTED /* This node handles multi meet packet. \
58+ Light hdr for module and multi meet were both introduced in 8.1, \
59+ so we could reduce the same flag value. */
5760#define CLUSTER_NODE_NULL_NAME \
5861 "\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" \
5962 "\000\000\000\000\000\000\000\000\000\000\000\000"
@@ -67,6 +70,7 @@ typedef struct clusterLink {
6770#define nodeFailed (n ) ((n)->flags & CLUSTER_NODE_FAIL)
6871#define nodeCantFailover (n ) ((n)->flags & CLUSTER_NODE_NOFAILOVER)
6972#define nodeSupportsExtensions (n ) ((n)->flags & CLUSTER_NODE_EXTENSIONS_SUPPORTED)
73+ #define nodeSupportsMultiMeet (n ) ((n)->flags & CLUSTER_NODE_MULTI_MEET_SUPPORTED)
7074#define nodeInNormalState (n ) (!((n)->flags & (CLUSTER_NODE_HANDSHAKE | CLUSTER_NODE_MEET | CLUSTER_NODE_PFAIL | CLUSTER_NODE_FAIL)))
7175
7276/* This structure represent elements of node->fail_reports. */
0 commit comments