Re: [Maria-developers] e5fc78f84e3: MDEV-20220: Merge 5.7 P_S replication table 'replication_applier_status_by_worker
Hello Andrei, Good Morning. On 22/03/21 3:50 pm, Andrei Elkin wrote:
Sujatha, howdy.
Just one note from me at this point,
==> https://dev.mysql.com/doc/refman/5.7/en/replication-channels.html
A multi-source replica can also be set up as a multi-threaded replica, by setting the slave_parallel_workers system variable to a value greater than 0. When you do this on a multi-source replica, each channel on the replica has the specified number of applier threads, plus a coordinator thread to manage them. You cannot configure the number of applier threads for individual channels.
In case of MySQL, worker threads are dedicated to particular channel.
In MariaDB "The pool of replication worker threads is shared among all multi-source master connections, and among all replication domains that can replicate in parallel using out-of-order".
Because of this I didn't include CHANNEL_NAME. In MariaDB Slave_worker thread's don't have WORKER_ID they only have 'thread_id'. Would it make sense to report
LAST_CHANNEL (or LAST_SOURCE) similar to other 'LAST_' like
|LAST_SEEN_TRANSACTION | Last GTID executed by worker |
?
Yes, as 'LAST_SOURCE', we can display 'mi->connection_name'. In MariaDB documentation 'CONNECTION_NAME' is used to identify a source, so I used 'CONNECTION_NAME' instead of 'CHANNEL_NAME'(MySQL'). Thank you. S.Sujatha
Fix: === 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: | |-------------------------------------------------------------------------------| | | | |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 error/force stop | | | | |SERVICE_STATE | Thread is running or not | | | | |LAST_SEEN_TRANSACTION | Last GTID executed by worker | | | | |LAST_ERROR_NUMBER | Last Error that occurred on a particular worker | | | | |LAST_ERROR_MESSAGE | Last error specific message | | | | |LAST_ERROR_TIMESTAMP | Time stamp of last error | | | | |WORKER_IDLE_TIME | Total idle time in seconds that the worker thread has | | | spent waiting for work from SQL thread | | | | |LAST_TRANS_RETRY_COUNT | Total number of retries attempted by last transaction | --------------------------------------------------------------------------------- Cheers,
Andrei
participants (1)
-
sujatha