Prevent unintentional reconnections to the master server
If a master_failure_mode was set to error_on_write, a reconnection to the old master would happen after the following events: - Master server fails and the connection is closed - The master server recovers - A slave fails and the connection is closed - A replacement for the slave is searched If these events took place, the master would be taken back into use with an inconsistent session state.
This commit is contained in:
@ -54,7 +54,7 @@ typedef enum bref_state
|
||||
BREF_WAITING_RESULT = 0x02, /*< for session commands only */
|
||||
BREF_QUERY_ACTIVE = 0x04, /*< for other queries */
|
||||
BREF_CLOSED = 0x08,
|
||||
BREF_SESCMD_FAILED = 0x10 /*< Backend references that should be dropped */
|
||||
BREF_FATAL_FAILURE = 0x10 /*< Backend references that should be dropped */
|
||||
} bref_state_t;
|
||||
|
||||
#define BREF_IS_NOT_USED(s) ((s)->bref_state & ~BREF_IN_USE)
|
||||
@ -62,7 +62,7 @@ typedef enum bref_state
|
||||
#define BREF_IS_WAITING_RESULT(s) ((s)->bref_num_result_wait > 0)
|
||||
#define BREF_IS_QUERY_ACTIVE(s) ((s)->bref_state & BREF_QUERY_ACTIVE)
|
||||
#define BREF_IS_CLOSED(s) ((s)->bref_state & BREF_CLOSED)
|
||||
#define BREF_HAS_FAILED(s) ((s)->bref_state & BREF_SESCMD_FAILED)
|
||||
#define BREF_HAS_FAILED(s) ((s)->bref_state & BREF_FATAL_FAILURE)
|
||||
|
||||
typedef enum backend_type_t
|
||||
{
|
||||
|
Reference in New Issue
Block a user