16

Group Replication SYSTEM messages in the error log

 3 years ago
source link: https://mysqlhighavailability.com/group-replication-system-messages-in-the-error-log/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Group Replication enables you to create fault-tolerant systems with redundancy by replicating the system state to a set of servers. Even if some of the servers subsequently fail, as long it is not all or a majority, the system is still available.

In order to allow DBAs to do post observation of the main events on a group lifetime, it is essential that those events are always logged. Users could already instruct the server to do that by increasing verbosity of the error log before 8.0.21. There is an easier way now.

On MySQL 8.0.21 we did a facelift on Group Replication log messages with one goal in mind:

A MySQL DBA must be capable of observing the main events of the group through the server’s error log, regardless of the error log verbosity.

To allow that we did reclassify many log messages as system messages. System messages are always logged, independently of the server log level.

Example of a primary failover:

2020-07-22T12:31:21.078766Z 0 [Warning] [MY-011493] [Repl] Plugin group_replication reported: 'Member with address 10.0.0.1:3306 has become unreachable.'
2020-07-22T12:31:32.082929Z 0 [Warning] [MY-011499] [Repl] Plugin group_replication reported: 'Members removed from the group: 10.0.0.1:3306'
2020-07-22T12:31:32.082960Z 0 [System] [MY-011500] [Repl] Plugin group_replication reported: 'Primary server with address 10.0.0.1:3306 left the group. Electing new Primary.'
2020-07-22T12:31:33.085475Z 0 [System] [MY-011507] [Repl] Plugin group_replication reported: 'A new primary with address 10.0.0.2:3306 was elected. The new primary will execute all previous group transactions before allowing writes.'
2020-07-22T12:31:54.674725Z 0 [System] [MY-011503] [Repl] Plugin group_replication reported: 'Group membership changed to 10.0.0.2:3306, 10.0.0.3:3306 on view 15767586730861839:4.'
2020-07-22T12:31:54.874627Z 39 [System] [MY-011566] [Repl] Plugin group_replication reported: 'Setting super_read_only=OFF.'
2020-07-22T12:31:54.876002Z 39 [System] [MY-011510] [Repl] Plugin group_replication reported: 'This server is working as primary member.'

The best thing of this improvement, the DBA/operator does not need to do any configuration change.

Conclusion

Following our tradition of steady improvements, we are once again making Group Replication simpler to use by using the same server default values.

316 total views,  182 views today


很遗憾的说,推酷将在这个月底关闭。人生海海,几度秋凉,感谢那些有你的时光。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK