1
0
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:
Sujatha
2021-04-08 16:09:09 +05:30
parent 94f1d0f84d
commit 036ee61246
9 changed files with 93 additions and 32 deletions

View File

@ -167,6 +167,29 @@ struct rpl_parallel_thread {
int last_error_number;
char last_error_message[MAX_SLAVE_ERRMSG];
ulonglong last_error_timestamp;
ulonglong worker_idle_time;
ulong last_trans_retry_count;
ulonglong start_time;
void start_time_tracker()
{
start_time= microsecond_interval_timer();
}
ulonglong compute_time_lapsed()
{
return (ulonglong)((microsecond_interval_timer() - start_time) / 1000000.0);
}
void add_to_worker_idle_time_and_reset()
{
worker_idle_time+= compute_time_lapsed();
start_time=0;
}
ulonglong get_worker_idle_time()
{
if (start_time)
return compute_time_lapsed();
else
return worker_idle_time;
}
void enqueue(queued_event *qev)
{
if (last_in_queue)