mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-20220: Merge 5.7 P_S replication table 'replication_applier_status_by_worker
Step1: ===== Backport 'replication_applier_status_by_worker' from upstream. Iterate through rpl_parallel_thread_pool and display slave worker thread specific information as part of 'replication_applier_status_by_worker' table. --------------------------------------------------------------------------- |Column Name: | Description: | |-------------------------------------------------------------------------| | | | |CHANNEL_NAME | Name of replication channel through which the | | | transaction is received. | | | | |THREAD_ID | Thread_Id as displayed in 'performance_schema. | | | threads' table for thread with name | | | 'thread/sql/rpl_parallel_thread' | | | | | | THREAD_ID will be NULL when worker threads are | | | stopped due to an error/force stop | | | | |SERVICE_STATE | Thread is running or not | | | | |LAST_SEEN_TRANSACTION | Last GTID executed by worker | | | | |LAST_ERROR_NUMBER | Last Error that occured on a particular worker | | | | |LAST_ERROR_MESSAGE | Last error specific message | | | | |LAST_ERROR_TIMESTAMP | Time stamp of last error | | | | --------------------------------------------------------------------------- CHANNEL_NAME will be empty when the worker has not processed any transaction. Channel_name points to valid source channel_name when it is processing a transaction/event group.
This commit is contained in:
@@ -51,6 +51,7 @@ Slave_reporting_capability::report(loglevel level, int err_code,
|
||||
pbuff= m_last_error.message;
|
||||
pbuffsize= sizeof(m_last_error.message);
|
||||
m_last_error.number = err_code;
|
||||
m_last_error.update_timestamp();
|
||||
report_function= sql_print_error;
|
||||
break;
|
||||
case WARNING_LEVEL:
|
||||
@@ -69,6 +70,7 @@ Slave_reporting_capability::report(loglevel level, int err_code,
|
||||
|
||||
mysql_mutex_unlock(&err_lock);
|
||||
va_end(args);
|
||||
err_thread_id= current_thd->thread_id;
|
||||
|
||||
/* If the msg string ends with '.', do not add a ',' it would be ugly */
|
||||
report_function("%s %s: %s%s %s%sInternal MariaDB error code: %d",
|
||||
|
Reference in New Issue
Block a user