diff options
Diffstat (limited to 'sql/rpl_parallel.cc')
-rw-r--r-- | sql/rpl_parallel.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 9f8a3450716..bdd68a33cc4 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -337,7 +337,7 @@ do_gco_wait(rpl_group_info *rgi, group_commit_orderer *gco, thd->set_time_for_next_stage(); do { - if (thd->check_killed() && !rgi->worker_error) + if (unlikely(thd->check_killed()) && !rgi->worker_error) { DEBUG_SYNC(thd, "rpl_parallel_start_waiting_for_prior_killed"); thd->clear_error(); @@ -402,7 +402,7 @@ do_ftwrl_wait(rpl_group_info *rgi, { if (entry->force_abort || rgi->worker_error) break; - if (thd->check_killed()) + if (unlikely(thd->check_killed())) { thd->send_kill_message(); slave_output_error_info(rgi, thd); @@ -453,7 +453,7 @@ pool_mark_busy(rpl_parallel_thread_pool *pool, THD *thd) } while (pool->busy) { - if (thd && thd->check_killed()) + if (thd && unlikely(thd->check_killed())) { thd->send_kill_message(); res= 1; @@ -571,7 +571,7 @@ rpl_pause_for_ftwrl(THD *thd) e->last_committed_sub_id < e->pause_sub_id && !err) { - if (thd->check_killed()) + if (unlikely(thd->check_killed())) { thd->send_kill_message(); err= 1; @@ -838,7 +838,7 @@ do_retry: } DBUG_EXECUTE_IF("inject_mdev8031", { /* Simulate pending KILL caught in read_relay_log_description_event(). */ - if (thd->check_killed()) { + if (unlikely(thd->check_killed())) { thd->send_kill_message(); err= 1; goto err; @@ -862,13 +862,13 @@ do_retry: if (ev) break; - if (rlog.error < 0) + if (unlikely(rlog.error < 0)) { errmsg= "slave SQL thread aborted because of I/O error"; err= 1; goto check_retry; } - if (rlog.error > 0) + if (unlikely(rlog.error > 0)) { sql_print_error("Slave SQL thread: I/O error reading " "event(errno: %d cur_log->error: %d)", @@ -1288,7 +1288,7 @@ handle_rpl_parallel_thread(void *arg) if (!err) #endif { - if (thd->check_killed()) + if (unlikely(thd->check_killed())) { thd->clear_error(); thd->get_stmt_da()->reset_diagnostics_area(); @@ -1301,7 +1301,7 @@ handle_rpl_parallel_thread(void *arg) delete_or_keep_event_post_apply(rgi, event_type, qev->ev); DBUG_EXECUTE_IF("rpl_parallel_simulate_temp_err_gtid_0_x_100", err= dbug_simulate_tmp_error(rgi, thd);); - if (err) + if (unlikely(err)) { convert_kill_to_deadlock_error(rgi); if (has_temporary_error(thd) && slave_trans_retries > 0) @@ -2075,7 +2075,7 @@ rpl_parallel_entry::choose_thread(rpl_group_info *rgi, bool *did_enter_cond, /* The thread is ready to queue into. */ break; } - else if (rli->sql_driver_thd->check_killed()) + else if (unlikely(rli->sql_driver_thd->check_killed())) { unlock_or_exit_cond(rli->sql_driver_thd, &thr->LOCK_rpl_thread, did_enter_cond, old_stage); @@ -2401,7 +2401,7 @@ rpl_parallel::wait_for_workers_idle(THD *thd) &stage_waiting_for_workers_idle, &old_stage); while (e->current_sub_id > e->last_committed_sub_id) { - if (thd->check_killed()) + if (unlikely(thd->check_killed())) { thd->send_kill_message(); err= 1; |