MXS-2273 Generalise names
The maintenance flag and being-drain flags will be turned on using the same variable, so the variable and constant names needs to be generalized.
This commit is contained in:
@ -134,9 +134,9 @@ public:
|
||||
/**
|
||||
* Maintenance mode request constants.
|
||||
*/
|
||||
static const int MAINTENANCE_OFF = -100;
|
||||
static const int MAINTENANCE_NO_CHANGE = 0;
|
||||
static const int MAINTENANCE_ON = 100;
|
||||
static const int SERVER_NO_CHANGE = 0;
|
||||
static const int SERVER_MAINT_OFF = 1;
|
||||
static const int SERVER_MAINT_ON = 2;
|
||||
|
||||
SERVER* server = nullptr; /**< The server being monitored */
|
||||
MYSQL* con = nullptr; /**< The MySQL connection */
|
||||
@ -145,8 +145,8 @@ public:
|
||||
uint64_t mon_prev_status = -1; /**< Status before starting the current monitor loop */
|
||||
uint64_t pending_status = 0; /**< Status during current monitor loop */
|
||||
int64_t disk_space_checked = 0; /**< When was the disk space checked the last time */
|
||||
int maint_request = MAINTENANCE_NO_CHANGE; /**< Is admin requesting Maintenance=ON/OFF on the
|
||||
* server? */
|
||||
int status_request = SERVER_NO_CHANGE; /**< Is admin requesting Maintenance=ON/OFF on the
|
||||
* server? */
|
||||
};
|
||||
|
||||
#define MAX_MONITOR_USER_LEN 512
|
||||
@ -162,8 +162,8 @@ public:
|
||||
virtual ~Monitor();
|
||||
virtual bool configure(const MXS_CONFIG_PARAMETER* params) = 0;
|
||||
|
||||
static const int MAINTENANCE_FLAG_NOCHECK = 0;
|
||||
static const int MAINTENANCE_FLAG_CHECK = -1;
|
||||
static const int STATUS_FLAG_NOCHECK = 0;
|
||||
static const int STATUS_FLAG_CHECK = -1;
|
||||
|
||||
/**
|
||||
* Starts the monitor. If the monitor requires polling of the servers, it should create
|
||||
@ -240,7 +240,7 @@ public:
|
||||
/** The state of the monitor. This should ONLY be written to by the admin thread. */
|
||||
monitor_state_t m_state {MONITOR_STATE_STOPPED};
|
||||
/** Set when admin requests a maintenance status change. */
|
||||
int check_maintenance_flag = MAINTENANCE_FLAG_NOCHECK;
|
||||
int check_status_flag = STATUS_FLAG_NOCHECK;
|
||||
|
||||
uint64_t m_ticks {0}; /**< Number of performed monitoring intervals */
|
||||
uint8_t m_journal_hash[SHA_DIGEST_LENGTH]; /**< SHA1 hash of the latest written journal */
|
||||
|
Reference in New Issue
Block a user