diff options
Diffstat (limited to 'src/cluster.h')
-rw-r--r-- | src/cluster.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cluster.h b/src/cluster.h index af85841c9..f2b9a4ecf 100644 --- a/src/cluster.h +++ b/src/cluster.h @@ -16,6 +16,7 @@ #define CLUSTER_DEFAULT_NODE_TIMEOUT 15000 #define CLUSTER_DEFAULT_SLAVE_VALIDITY 10 /* Slave max data age factor. */ #define CLUSTER_DEFAULT_REQUIRE_FULL_COVERAGE 1 +#define CLUSTER_DEFAULT_SLAVE_NO_FAILOVER 0 /* Failover by default. */ #define CLUSTER_FAIL_REPORT_VALIDITY_MULT 2 /* Fail report validity. */ #define CLUSTER_FAIL_UNDO_TIME_MULT 2 /* Undo fail if master is back. */ #define CLUSTER_FAIL_UNDO_TIME_ADD 10 /* Some additional time. */ @@ -55,6 +56,7 @@ typedef struct clusterLink { #define CLUSTER_NODE_NOADDR 64 /* We don't know the address of this node */ #define CLUSTER_NODE_MEET 128 /* Send a MEET message to this node */ #define CLUSTER_NODE_MIGRATE_TO 256 /* Master elegible for replica migration. */ +#define CLUSTER_NODE_NOFAILOVER 512 /* Slave will not try to failver. */ #define CLUSTER_NODE_NULL_NAME "\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\000\000\000\000\000\000\000\000\000\000\000\000" #define nodeIsMaster(n) ((n)->flags & CLUSTER_NODE_MASTER) @@ -64,6 +66,7 @@ typedef struct clusterLink { #define nodeWithoutAddr(n) ((n)->flags & CLUSTER_NODE_NOADDR) #define nodeTimedOut(n) ((n)->flags & CLUSTER_NODE_PFAIL) #define nodeFailed(n) ((n)->flags & CLUSTER_NODE_FAIL) +#define nodeCantFailover(n) ((n)->flags & CLUSTER_NODE_NOFAILOVER) /* Reasons why a slave is not able to failover. */ #define CLUSTER_CANT_FAILOVER_NONE 0 |