1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

MDEV-16437: merge 5.7 P_S replication instrumentation and tables

Merge 'replication_applier_status_by_coordinator' table.

This table captures SQL_THREAD status in case of both single threaded and
multi threaded slave configuration. When multi_source replication is enabled
this table will display each source specific SQL_THREAD status.

Added new columns for:
 - LAST_SEEN_TRANSACTION
 - LAST_TRANS_RETRY_COUNT
This commit is contained in:
Sujatha
2021-04-16 09:02:00 +05:30
parent 2674365c8e
commit 70642871bc
14 changed files with 551 additions and 18 deletions

View File

@@ -179,6 +179,26 @@ Last_SQL_Errno = '0'
Slave_heartbeat_period = '60.000'
Slave_heartbeat_period = '60.000'
#
#
# MDEV:16437: merge 5.7 P_S replication instrumentation and tables
#
SELECT * FROM performance_schema.replication_applier_status_by_coordinator;
CHANNEL_NAME master1
THREAD_ID #
SERVICE_STATE ON
LAST_ERROR_NUMBER 0
LAST_ERROR_MESSAGE
LAST_ERROR_TIMESTAMP 0000-00-00 00:00:00
LAST_SEEN_TRANSACTION 0-1-7
LAST_TRANS_RETRY_COUNT 0
CHANNEL_NAME
THREAD_ID #
SERVICE_STATE ON
LAST_ERROR_NUMBER 0
LAST_ERROR_MESSAGE
LAST_ERROR_TIMESTAMP 0000-00-00 00:00:00
LAST_SEEN_TRANSACTION 0-2-4
LAST_TRANS_RETRY_COUNT 0
select * from db1.t1;
i f1
1 one

View File

@@ -185,6 +185,26 @@ IGNORE_SERVER_IDS
REPL_DO_DOMAIN_IDS
REPL_IGNORE_DOMAIN_IDS
start all slaves;
#
# MDEV:16437: merge 5.7 P_S replication instrumentation and tables
#
select * from performance_schema.replication_applier_status_by_coordinator;
CHANNEL_NAME slave2
THREAD_ID #
SERVICE_STATE ON
LAST_ERROR_NUMBER 0
LAST_ERROR_MESSAGE
LAST_ERROR_TIMESTAMP 0000-00-00 00:00:00
LAST_SEEN_TRANSACTION
LAST_TRANS_RETRY_COUNT 0
CHANNEL_NAME slave1
THREAD_ID #
SERVICE_STATE ON
LAST_ERROR_NUMBER 0
LAST_ERROR_MESSAGE
LAST_ERROR_TIMESTAMP 0000-00-00 00:00:00
LAST_SEEN_TRANSACTION
LAST_TRANS_RETRY_COUNT 0
stop slave 'slave1';
show slave 'slave1' status;
Slave_IO_State

View File

@@ -58,6 +58,12 @@ query_vertical select * from performance_schema.replication_connection_configura
# Ensure that start all slaves doesn't do anything as all slaves are started
start all slaves;
--echo #
--echo # MDEV:16437: merge 5.7 P_S replication instrumentation and tables
--echo #
--replace_column 2 #
query_vertical select * from performance_schema.replication_applier_status_by_coordinator;
stop slave 'slave1';
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space1 <relay_log_space1> $relay_log_space2 <relay_log_space2>