Go to the source code of this file.
|
| Slave_worker * | get_least_occupied_worker (Relay_log_info *rli, Slave_worker_array *workers, Log_event *ev) |
| | Legends running throughout the module: More...
|
| |
| bool | handle_slave_worker_stop (Slave_worker *worker, Slave_job_item *job_item) |
| | This function is called by both coordinator and workers. More...
|
| |
| bool | set_max_updated_index_on_stop (Slave_worker *worker, Slave_job_item *job_item) |
| | This function is called by both coordinator and workers. More...
|
| |
| TABLE * | mts_move_temp_tables_to_thd (THD *, TABLE *) |
| | Relocation of the list of temporary tables to thd->temporary_tables. More...
|
| |
| TABLE * | mts_move_temp_tables_to_thd (THD *, TABLE *, enum_mts_parallel_type) |
| |
| bool | append_item_to_jobs (slave_job_item *job_item, Slave_worker *w, Relay_log_info *rli) |
| | Coordinator enqueues a job item into a Worker private queue. More...
|
| |
| Slave_worker * | get_thd_worker (const THD *thd) |
| |
| int | slave_worker_exec_job_group (Slave_worker *w, Relay_log_info *rli) |
| | apply one job group. More...
|
| |
◆ append_item_to_jobs()
Coordinator enqueues a job item into a Worker private queue.
- Parameters
-
| job_item | a pointer to struct carrying a reference to an event |
| worker | a pointer to the assigned Worker struct |
| rli | a pointer to Relay_log_info of Coordinator |
- Returns
- false Success. true Thread killed or worker stopped while waiting for successful enqueue.
◆ get_least_occupied_worker()
Legends running throughout the module:
C - Coordinator CP - checkpoint W - Worker
B-event event that Begins a group (a transaction) T-event event that Terminates a group (a transaction)
Legends running throughout the module:
- Parameters
-
| rli | pointer to Relay_log_info of Coordinator |
| ws | dynarray of pointers to Slave_worker |
| ev | event for which we are searching for a worker |
- Returns
- a pointer to chosen Slave_worker instance
◆ get_thd_worker()
◆ handle_slave_worker_stop()
This function is called by both coordinator and workers.
Upon receiving the STOP command, the workers will identify a maximum group index already executed (or under execution).
All groups whose index are below or equal to the maximum group index will be applied by the workers before stopping.
The workers with groups above the maximum group index will exit without applying these groups by setting their running status to "STOP_ACCEPTED".
- Parameters
-
| worker | a pointer to the waiting Worker struct |
| job_item | a pointer to struct carrying a reference to an event |
- Returns
- true if STOP command gets accepted otherwise false is returned.
◆ mts_move_temp_tables_to_thd() [1/2]
| TABLE * mts_move_temp_tables_to_thd |
( |
THD * |
thd, |
|
|
TABLE * |
temporary_tables |
|
) |
| |
Relocation of the list of temporary tables to thd->temporary_tables.
- Parameters
-
| thd | THD instance pointer of the destination |
| temporary_tables | the source temporary_tables list |
- Note
- destroying references to the source list, if necessary, is left to the caller.
- Returns
- the post-merge value of thd->temporary_tables.
◆ mts_move_temp_tables_to_thd() [2/2]
◆ set_max_updated_index_on_stop()
This function is called by both coordinator and workers.
Both coordinator and workers contribute to max_updated_index.
- Parameters
-
| worker | a pointer to the waiting Worker struct |
| job_item | a pointer to struct carrying a reference to an event |
- Returns
- true if STOP command gets accepted otherwise false is returned.
◆ slave_worker_exec_job_group()
apply one job group.
- Note
- the function maintains worker's CGEP and modifies APH, updates the current group item in GAQ via
slave_worker_ends_group().
param[in] worker the worker which calls it. param[in] rli slave's relay log info object.
return returns 0 if the group of jobs are applied successfully, otherwise returns an error code.
◆ w_rr