mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-20220: Merge 5.7 P_S replication table 'replication_applier_status_by_worker
Step2: ===== Add two extra columns mentioned below. --------------------------------------------------------------------------- |Column Name: | Description: | |-------------------------------------------------------------------------| | | | |WORKER_IDLE_TIME | Total idle time in seconds that the worker | | | thread has spent waiting for work from | | | co-ordinator thread | | | | |LAST_TRANS_RETRY_COUNT | Total number of retries attempted by last | | | transaction | ---------------------------------------------------------------------------
This commit is contained in:
@ -799,6 +799,7 @@ do_retry:
|
||||
|
||||
mysql_mutex_lock(&rli->data_lock);
|
||||
++rli->retried_trans;
|
||||
++rpt->last_trans_retry_count;
|
||||
statistic_increment(slave_retried_transactions, LOCK_status);
|
||||
mysql_mutex_unlock(&rli->data_lock);
|
||||
|
||||
@ -1125,6 +1126,7 @@ handle_rpl_parallel_thread(void *arg)
|
||||
uint wait_count= 0;
|
||||
rpl_parallel_thread::queued_event *qev, *next_qev;
|
||||
|
||||
rpt->start_time_tracker();
|
||||
thd->ENTER_COND(&rpt->COND_rpl_thread, &rpt->LOCK_rpl_thread,
|
||||
&stage_waiting_for_work_from_sql_thread, &old_stage);
|
||||
/*
|
||||
@ -1148,6 +1150,7 @@ handle_rpl_parallel_thread(void *arg)
|
||||
}
|
||||
rpt->dequeue1(events);
|
||||
thd->EXIT_COND(&old_stage);
|
||||
rpt->add_to_worker_idle_time_and_reset();
|
||||
|
||||
more_events:
|
||||
for (qev= events; qev; qev= next_qev)
|
||||
@ -1193,6 +1196,7 @@ handle_rpl_parallel_thread(void *arg)
|
||||
/* Handle a new event group, which will be initiated by a GTID event. */
|
||||
if ((event_type= qev->ev->get_type_code()) == GTID_EVENT)
|
||||
{
|
||||
rpt->last_trans_retry_count= 0;
|
||||
rpt->last_seen_gtid= rgi->current_gtid;
|
||||
rpt->channel_name_length= (uint)rgi->rli->mi->connection_name.length;
|
||||
if (rpt->channel_name_length)
|
||||
@ -2015,7 +2019,8 @@ rpl_parallel_thread::loc_free_gco(group_commit_orderer *gco)
|
||||
|
||||
|
||||
rpl_parallel_thread::rpl_parallel_thread()
|
||||
: channel_name_length(0), last_error_number(0), last_error_timestamp(0)
|
||||
: channel_name_length(0), last_error_number(0), last_error_timestamp(0),
|
||||
worker_idle_time(0), last_trans_retry_count(0), start_time(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user