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

Galera cluster one of the node desyncs and resyncs periodically

我使用 MariaDB 设置了三节点 Galera 集群,我看到其中一个节点的重复消息,它从集群中取消同步并在几秒钟内重新同步。此消息每小时重复一次。虽然这只是一个通知,但我想了解一下原因。所有服务器上的配置都相同。有谁知道为什么会这样?或者是否有人遇到过类似的此类问题。以下是详情。

MariaDB version 10.3.12
Galera version: 25.3.23-1
OS: RHEL 7.4
State transfer mechanism: default

下面是我在节点上的 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 工具在节点上 运行 定期备份的事实。在那段时间节点 de-syncs 本身来自集群以保持一致性。