mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.7' into 10.8
This commit is contained in:
@ -250,6 +250,7 @@ finish_event_group(rpl_parallel_thread *rpt, uint64 sub_id,
|
||||
entry->stop_on_error_sub_id == (uint64)ULONGLONG_MAX)
|
||||
entry->stop_on_error_sub_id= sub_id;
|
||||
mysql_mutex_unlock(&entry->LOCK_parallel_entry);
|
||||
#ifdef ENABLED_DEBUG_SYNC
|
||||
DBUG_EXECUTE_IF("hold_worker_on_schedule", {
|
||||
if (entry->stop_on_error_sub_id < (uint64)ULONGLONG_MAX)
|
||||
{
|
||||
@ -264,6 +265,7 @@ finish_event_group(rpl_parallel_thread *rpt, uint64 sub_id,
|
||||
STRING_WITH_LEN("now WAIT_FOR proceed_by_1000"));
|
||||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
if (rgi->killed_for_retry == rpl_group_info::RETRY_KILL_PENDING)
|
||||
wait_for_pending_deadlock_kill(thd, rgi);
|
||||
@ -807,6 +809,7 @@ do_retry:
|
||||
rgi->killed_for_retry= rpl_group_info::RETRY_KILL_KILLED;
|
||||
thd->set_killed(KILL_CONNECTION);
|
||||
});
|
||||
#ifdef ENABLED_DEBUG_SYNC
|
||||
DBUG_EXECUTE_IF("rpl_parallel_simulate_wait_at_retry", {
|
||||
if (rgi->current_gtid.seq_no == 1001) {
|
||||
debug_sync_set_action(thd,
|
||||
@ -814,6 +817,7 @@ do_retry:
|
||||
}
|
||||
DEBUG_SYNC(thd, "rpl_parallel_simulate_wait_at_retry");
|
||||
});
|
||||
#endif
|
||||
|
||||
rgi->cleanup_context(thd, 1);
|
||||
wait_for_pending_deadlock_kill(thd, rgi);
|
||||
@ -1237,6 +1241,7 @@ handle_rpl_parallel_thread(void *arg)
|
||||
bool did_enter_cond= false;
|
||||
PSI_stage_info old_stage;
|
||||
|
||||
#ifdef ENABLED_DEBUG_SYNC
|
||||
DBUG_EXECUTE_IF("hold_worker_on_schedule", {
|
||||
if (rgi->current_gtid.domain_id == 0 &&
|
||||
rgi->current_gtid.seq_no == 100) {
|
||||
@ -1251,6 +1256,7 @@ handle_rpl_parallel_thread(void *arg)
|
||||
STRING_WITH_LEN("now SIGNAL scheduled_gtid_0_x_100"));
|
||||
}
|
||||
});
|
||||
#endif
|
||||
|
||||
if(unlikely(thd->wait_for_commit_ptr) && group_rgi != NULL)
|
||||
{
|
||||
@ -2437,11 +2443,13 @@ rpl_parallel_thread * rpl_parallel_entry::choose_thread_internal(uint idx,
|
||||
unlock_or_exit_cond(rli->sql_driver_thd, &thr->LOCK_rpl_thread,
|
||||
did_enter_cond, old_stage);
|
||||
my_error(ER_CONNECTION_KILLED, MYF(0));
|
||||
#ifdef ENABLED_DEBUG_SYNC
|
||||
DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max",
|
||||
{
|
||||
debug_sync_set_action(rli->sql_driver_thd,
|
||||
STRING_WITH_LEN("now SIGNAL wait_queue_killed"));
|
||||
};);
|
||||
#endif
|
||||
slave_output_error_info(rgi, rli->sql_driver_thd);
|
||||
return NULL;
|
||||
}
|
||||
@ -2459,11 +2467,13 @@ rpl_parallel_thread * rpl_parallel_entry::choose_thread_internal(uint idx,
|
||||
Because debug_sync changes the thd->mysys_var->current_mutex,
|
||||
and this can cause THD::awake to use the wrong mutex.
|
||||
*/
|
||||
#ifdef ENABLED_DEBUG_SYNC
|
||||
DBUG_EXECUTE_IF("rpl_parallel_wait_queue_max",
|
||||
{
|
||||
debug_sync_set_action(rli->sql_driver_thd,
|
||||
STRING_WITH_LEN("now SIGNAL wait_queue_ready"));
|
||||
};);
|
||||
#endif
|
||||
rli->sql_driver_thd->ENTER_COND(&thr->COND_rpl_thread_queue,
|
||||
&thr->LOCK_rpl_thread,
|
||||
&stage_waiting_for_room_in_worker_thread,
|
||||
@ -2625,11 +2635,13 @@ rpl_parallel::wait_for_done(THD *thd, Relay_log_info *rli)
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef ENABLED_DEBUG_SYNC
|
||||
DBUG_EXECUTE_IF("rpl_parallel_wait_for_done_trigger",
|
||||
{
|
||||
debug_sync_set_action(thd,
|
||||
STRING_WITH_LEN("now SIGNAL wait_for_done_waiting"));
|
||||
};);
|
||||
#endif
|
||||
|
||||
global_rpl_thread_pool.copy_pool_for_pfs(rli);
|
||||
/*
|
||||
|
Reference in New Issue
Block a user