In MySQL 8.0.2, users will see the additional columns in the existing Group Replication Performance Schema tables which will provide extended information about Group Replication. Now user can view role and MySQL version of each member of the group, which earlier required a complex set of query. The user can also see additional statistics of each member of the group, like remote applier queue count, remote transactions applied, number of transactions proposed by member and number of proposed transactions rolled back by the group. These have been a constant request from the users of the Group Replication plugin for a very long time.
We have added new columns to the replication_group_member and replication_group_member_stats tables in performance_schema. There has been no changes to existing Group Replication performance_schema tables. You can find detail about the changes made below.
Replication_group_members
New columns added to performance_schema.replication_group_members:
- MEMBER_ROLE
- MEMBER_VERSION
Schema of performance_schema.replication_group_members post changes:
- CHANNEL_NAME – Name of the group replication channel.
- MEMBER_ID – Member UUID.
- MEMBER_HOST – Network BIND address of the SQL access to the member.
- MEMBER_PORT – Port of SQL access to the member.
- MEMBER_STATE – Current state of this member.
- MEMBER_ROLE – Member role in a group, PRIMARY or SECONDARY.
- MEMBER_VERSION – The MySQL version of the member.
Sample output of performance_schema.replication_group_members for 3 members:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
mysql> select * from performance_schema.replication_group_members\G *************************** 1. row *************************** CHANNEL_NAME: group_replication_applier MEMBER_ID: a21badd5-6bcb-11e7-928e-f0d5bf747fb1 MEMBER_HOST: MEMBER1 MEMBER_PORT: 3306 MEMBER_STATE: ONLINE MEMBER_ROLE: PRIMARY MEMBER_VERSION: 8.0.2 *************************** 2. row *************************** CHANNEL_NAME: group_replication_applier MEMBER_ID: a256fdee-6bcb-11e7-922d-f0d5bf747fb1 MEMBER_HOST: MEMBER2 MEMBER_PORT: 3306 MEMBER_STATE: ONLINE MEMBER_ROLE: PRIMARY MEMBER_VERSION: 8.0.2 *************************** 3. row *************************** CHANNEL_NAME: group_replication_applier MEMBER_ID: a2a32054-6bcb-11e7-9266-f0d5bf747fb1 MEMBER_HOST: MEMBER3 MEMBER_PORT: 3306 MEMBER_STATE: ONLINE MEMBER_ROLE: PRIMARY MEMBER_VERSION: 8.0.2 3 rows in set (0.01 sec) |
Replication_group_member_stats
In this enhancement, the Group Replication will show information of each member in the performance_schema.replication_group_member_stats table. The local member information, the one where the query is performed, it is always the real time information. The information about remote members has a configured delay and this delay is controlled by group_replication_flow_control_period option, which is the period in which the group stats messages are exchanged.
New columns added to performance_schema.replication_group_member_stats:
- COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE
- COUNT_TRANSACTIONS_REMOTE_APPLIED
- COUNT_TRANSACTION_LOCAL_PROPOSED
- COUNT_TRANSACTION_LOCAL_ROLLEDBACK
Schema of performance_schema.replication_group_member_stats post changes:
- CHANNEL_NAME – Name of the group replication channel.
- VIEW_ID – Current view identifier for this group.
- MEMBER_ID – Member UUID.
- COUNT_TRANSACTIONS_IN_QUEUE – Number of transactions pending certification.
- COUNT_TRANSACTIONS_CHECKED – Number of transactions already certified.
- COUNT_CONFLICTS_DETECTED – Number of transactions that were negatively certified.
- COUNT_TRANSACTIONS_ROWS_VALIDATING – Number of transactions with which one can execute certification with them, but have not been garbage collected.
- TRANSACTIONS_COMMITTED_ALL_MEMBERS – Set of stable group transactions, that is, that all members did already committed.
- LAST_CONFLICT_FREE_TRANSACTION – Latest transaction certified without conflicts.
- COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE – Number of transaction received from the group waiting to be applied.
- COUNT_TRANSACTIONS_REMOTE_APPLIED – Number of transactions received from the group which have been applied by the member.
- COUNT_TRANSACTIONS_LOCAL_PROPOSED – Number of transaction forwarded by member to group for co-ordination.
- COUNT_TRANSACTIONS_LOCAL_ROLLBACK – Number of transactions forwarded by member and got rolled back by the group.
Sample output of performance_schema.replication_group_member_stats for 2 members:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
mysql> select * from performance_schema.replication_group_member_stats\G *************************** 1. row *************************** CHANNEL_NAME: group_replication_applier VIEW_ID: 15003908034996377:3 MEMBER_ID: a21badd5-6bcb-11e7-928e-f0d5bf747fb1 COUNT_TRANSACTIONS_IN_QUEUE: 0 COUNT_TRANSACTIONS_CHECKED: 14 COUNT_CONFLICTS_DETECTED: 1 COUNT_TRANSACTIONS_ROWS_VALIDATING: 0 TRANSACTIONS_COMMITTED_ALL_MEMBERS: a2f9372b-6bcb-11e7-928e-f0d5bf747fb1:1-6:1000003-1000012 LAST_CONFLICT_FREE_TRANSACTION: a2f9372b-6bcb-11e7-928e-f0d5bf747fb1:1000012 COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE: 0 COUNT_TRANSACTIONS_REMOTE_APPLIED: 10 COUNT_TRANSACTIONS_LOCAL_PROPOSED: 4 COUNT_TRANSACTIONS_LOCAL_ROLLBACK: 1 *************************** 2. row *************************** CHANNEL_NAME: group_replication_applier VIEW_ID: 15003908034996377:3 MEMBER_ID: a256fdee-6bcb-11e7-922d-f0d5bf747fb1 COUNT_TRANSACTIONS_IN_QUEUE: 0 COUNT_TRANSACTIONS_CHECKED: 14 COUNT_CONFLICTS_DETECTED: 1 COUNT_TRANSACTIONS_ROWS_VALIDATING: 0 TRANSACTIONS_COMMITTED_ALL_MEMBERS: a2f9372b-6bcb-11e7-928e-f0d5bf747fb1:1-6:1000003-1000012 LAST_CONFLICT_FREE_TRANSACTION: a2f9372b-6bcb-11e7-928e-f0d5bf747fb1:1000012 COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE: 0 COUNT_TRANSACTIONS_REMOTE_APPLIED: 4 COUNT_TRANSACTIONS_LOCAL_PROPOSED: 10 COUNT_TRANSACTIONS_LOCAL_ROLLBACK: 0 *************************** 3. row *************************** CHANNEL_NAME: group_replication_applier VIEW_ID: 15003908034996377:3 MEMBER_ID: a2a32054-6bcb-11e7-9266-f0d5bf747fb1 COUNT_TRANSACTIONS_IN_QUEUE: 0 COUNT_TRANSACTIONS_CHECKED: 14 COUNT_CONFLICTS_DETECTED: 1 COUNT_TRANSACTIONS_ROWS_VALIDATING: 0 TRANSACTIONS_COMMITTED_ALL_MEMBERS: a2f9372b-6bcb-11e7-928e-f0d5bf747fb1:1-6:1000003-1000012 LAST_CONFLICT_FREE_TRANSACTION: a2f9372b-6bcb-11e7-928e-f0d5bf747fb1:1000012 COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE: 0 COUNT_TRANSACTIONS_REMOTE_APPLIED: 15 COUNT_TRANSACTIONS_LOCAL_PROPOSED: 0 COUNT_TRANSACTIONS_LOCAL_ROLLBACK: 0 3 rows in set (0.00 sec) |
Conclusion
Download the new MySQL 8.0.2 DMR to find the extended Group Replication Performance Schema tables and let us know your feedback.