24#ifndef GR_AUTOREJOIN_INCLUDED 
   25#define GR_AUTOREJOIN_INCLUDED 
Represents and encapsulates the logic responsible for handling the auto-rejoin process within Group R...
Definition: autorejoin.h:49
 
ulonglong m_rejoin_timeout
the time to wait in seconds until the next rejoin attempt.
Definition: autorejoin.h:168
 
Autorejoin_thread()
Initializes the synchronization primitives of the thread.
Definition: autorejoin.cc:37
 
bool m_being_terminated
flag that indicates that the auto-rejoin module is in the process of being terminated.
Definition: autorejoin.h:164
 
Autorejoin_thread(const Autorejoin_thread &)=delete
Deleted copy ctor.
 
static void * launch_thread(void *arg)
The thread callback passed onto mysql_thread_create.
Definition: autorejoin.cc:32
 
thread_state m_autorejoin_thd_state
the state of the thread.
Definition: autorejoin.h:151
 
bool abort_rejoin()
Aborts the thread's main loop, effectively killing the thread.
Definition: autorejoin.cc:59
 
int start_autorejoin(uint attempts, ulonglong timeout)
Starts the process of auto-rejoin, launches the thread that will call attempt_rejoin() until it succe...
Definition: autorejoin.cc:104
 
void init()
Initializes the auto-rejoin module with a clean slate, i.e.
Definition: autorejoin.cc:53
 
Autorejoin_thread(const Autorejoin_thread &&)=delete
Deleted move ctor.
 
~Autorejoin_thread()
The dtor for the thread will destroy the mutex and cond_var.
Definition: autorejoin.cc:48
 
void autorejoin_thread_handle()
The thread handle, i.e.
Definition: autorejoin.cc:249
 
void execute_rejoin_process()
Handles the busy-wait retry loop.
Definition: autorejoin.cc:160
 
THD * m_thd
the THD handle.
Definition: autorejoin.h:149
 
Autorejoin_thread & operator=(const Autorejoin_thread &&)=delete
Deleted move operator.
 
std::atomic< bool > m_abort
flag to indicate whether or not the thread is to be aborted.
Definition: autorejoin.h:159
 
Autorejoin_thread & operator=(const Autorejoin_thread &)=delete
Deleted assignment operator.
 
ulong m_attempts
the number of attempts for the rejoin.
Definition: autorejoin.h:166
 
mysql_mutex_t m_run_lock
the mutex for controlling access to the thread itself.
Definition: autorejoin.h:155
 
mysql_cond_t m_run_cond
the cond_var used to signal the thread.
Definition: autorejoin.h:157
 
my_thread_handle m_handle
the thread handle.
Definition: autorejoin.h:153
 
bool is_autorejoin_ongoing()
Returns a flag indicating whether or not the auto-rejoin process is ongoing on this thread.
Definition: autorejoin.cc:153
 
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
 
unsigned long long int ulonglong
Definition: my_inttypes.h:56
 
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:496
 
Definition: my_thread_bits.h:52
 
An instrumented cond structure.
Definition: mysql_cond_bits.h:50
 
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
 
Definition: plugin_utils.h:47
 
unsigned int uint
Definition: uca9-dump.cc:75