我在galera 4中使用了MariaDB10.5,我有一个3节点集群,在过去的6个月中运行得很好。最近,我在非常密集的cpu查询方面遇到了问题,不得不终止这个过程。其中一个节点(n1)不同步,所以我重新创建了它。一切都同步得很,但从那天起,n1播放了wsrep_cluster_size=0,其余的都显示了wsrep_cluster_size=3。几天后,我决定停止n2和n3,从n1重新创建它。一切都进行得很顺利,但现在n3播放了wsrep_cluster_size=0和n1,n2显示了wsrep_cluster_size=3,我不知道发生了什么。我检查了所有的日志,手动检查了所有的表,一切看起来都很好。数据是同步的,数据库运行得很好。
这是我的配置
[mysqld] binlog_format = ROW bind-address = 0.0.0.0 # Galera Provider Configuration wsrep_on = ON wsrep_provider = /usr/lib/galera/libgalera_smm.so # Galera Cluster Configuration wsrep_cluster_name = cluser wsrep_cluster_address = gcomm://10.0.0.2,10.0.0.3,10.0.0.4 wsrep_node_address = 10.0.0.2 wsrep_node_name = n1 # Galera Synchronization Configuration wsrep_sst_method = rsync log_error = /var/lib/mysql/node.log default_storage_engine = InnoDB innodb_autoinc_lock_mode = 2 innodb_locks_unsafe_for_binlog = 1 innodb_file_per_table = 1 #innodb_thread_concurrency = 0 innodb_buffer_pool_size = 10G #innodb_log_buffer_size = 64M innodb_flush_method = O_DIRECT innodb_log_file_size = 2G innodb_log_files_in_group = 2 wsrep_slave_threads = 5 innodb_locks_unsafe_for_binlog = 1 innodb_autoinc_lock_mode = 2 skip-name-resolve lc-messages-dir = /usr/share/mysql skip-external-locking key_buffer_size = 16M max_connections = 300 wait_timeout = 20 max_allowed_packet = 16M thread_stack = 192K thread_cache_size = 8 # * Query Cache Configuration