Galera群集的节点之一会定期取消同步和重新同步

问题描述

我使用MariaDB设置了三个节点的galera群集,我看到其中一个节点重复发送消息,该节点从群集中取消自身同步并在几秒钟内重新同步。此消息每小时重复一次。尽管这只是一个通知,但我想了解原因。所有服务器上的配置均相同。有谁知道为什么会这样?或者有人遇到类似的问题。下面是详细信息。

MariaDB版本10.3.12
galera版本:25.3.23-1
作业系统:RHEL 7.4
状态传输机制:

下面是我在上面提到的观察结果的节点上的galera配置。

[galera]
# Mandatory settings
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_provider_options="gcache.size=300M; gcache.page_size=300M; pc.ignore_sb=false; pc.ignore_quorum=false"
#wsrep_cluster_address defines members of the cluster
wsrep_cluster_address=gcomm://192.168.1.1,192.168.1.2,192.168.1.3
wsrep_cluster_name="mariadb-cluster"
#wsrep_node_address passed to replication pluggin
wsrep_node_address=192.168.1.1
#wsrep_node_incoming_address is used for replicationclient connections
wsrep_node_incoming_address=192.168.1.1
wsrep_debug=OFF
#
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_doublewrite=1
query_cache_size=0
innodb_flush_log_at_trx_commit=0
innodb_buffer_pool_size=122M

错误消息如下所示

Aug 28 16:38:42 maria1 MysqLd: 2020-08-28 16:38:42 0 [Note] WSREP: Member 2.0 (maria1) desyncs itself from group
Aug 28 16:38:42 maria1 MysqLd: 2020-08-28 16:38:42 0 [Note] WSREP: Shifting SYNCED -> DOnor/DESYNCED (TO: 7430165)
Aug 28 16:38:42 maria1 MysqLd: 2020-08-28 16:38:42 452 [Note] WSREP: Provider paused at 08e2494b-12ff-11e9-9785-4fa29d91e9c5:7430165 (22186)
Aug 28 16:38:50 maria1 MysqLd: 2020-08-28 16:38:50 452 [Note] WSREP: resuming provider at 22186
Aug 28 16:38:50 maria1 MysqLd: 2020-08-28 16:38:50 452 [Note] WSREP: Provider resumed.
Aug 28 16:38:50 maria1 MysqLd: 2020-08-28 16:38:50 0 [Note] WSREP: Member 2.0 (maria1) resyncs itself to group
Aug 28 16:38:50 maria1 MysqLd: 2020-08-28 16:38:50 0 [Note] WSREP: Shifting DOnor/DESYNCED -> JOINED (TO: 7430165)
Aug 28 16:38:50 maria1 MysqLd: 2020-08-28 16:38:50 0 [Note] WSREP: Member 2.0 (maria1) synced with group.
Aug 28 16:38:50 maria1 MysqLd: 2020-08-28 16:38:50 0 [Note] WSREP: Shifting JOINED -> SYNCED (TO: 7430165)
Aug 28 16:38:50 maria1 MysqLd: 2020-08-28 16:38:50 2 [Note] WSREP: Synchronized with group,ready for connections
Aug 28 16:38:50 maria1 MysqLd: 2020-08-28 16:38:50 2 [Note] WSREP: wsrep_notify_cmd is not defined,skipping notification.

解决方法

我发现,我错过了通过Mariabackup工具在节点上运行定期备份的事实。在这段时间内,节点将自己从群集中取消同步以保持一致性。