Hide the MonitorInstance m_state field

The field had the same purpose as MXS_MONITOR->state. Now the field
is only used for checking if the MonitorInstance thread is running.
This commit is contained in:
Esa Korhonen
2018-08-15 15:22:53 +03:00
parent fe5df6d379
commit 57706e7758
4 changed files with 72 additions and 82 deletions

View File

@ -237,12 +237,13 @@ struct mxs_monitor
SPINLOCK lock;
MXS_CONFIG_PARAMETER* parameters; /*< configuration parameters */
MXS_MONITORED_SERVER* monitored_servers; /*< List of servers the monitor monitors */
monitor_state_t state; /**< The state of the monitor */
monitor_state_t state; /**< The state of the monitor. This should ONLY be written to by the admin
* thread. */
int connect_timeout; /**< Connect timeout in seconds for mysql_real_connect */
int connect_attempts; /**< How many times a connection is attempted */
int connect_attempts; /**< How many times a connection is attempted */
int read_timeout; /**< Timeout in seconds to read from the server.
* There are retries and the total effective timeout
* value is three times the option value.
* There are retries and the total effective timeout
* value is three times the option value.
*/
int write_timeout; /**< Timeout in seconds for each attempt to write to the server.
* There are retries and the total effective timeout value is