近期某个系统中的galera cluseter环境发生A DDL操作后,B节点未同步的情况,同时B节点的errorlog中有如下警告信息:

2016-07-23 17:31:32 18920 [Warning] WSREP: RBR event 1 Query apply warning: 1, 7866890
2016-07-23 17:31:32 18920 [Warning] WSREP: Ignoring error for TO isolated action: source: cc757ba3-4e3c-11e6-8893-8b18f5f1ec79 version: 3 local: 0 state: APPLYING flags: 65 conn_id: 814 trx_id: -1 seqnos (l: 207, g: 7866890, s: 7866889, d: 7866889, ts: 5701897716366444)
2016-07-25 15:58:17 18920 [ERROR] Slave SQL: Error 'Unknown table 'hs_member.mem'' on query. Default database: 'hs_member'. Query: 'DROP TABLE `mem`', Error_code: 1051
2016-07-25 15:58:17 18920 [Warning] WSREP: RBR event 1 Query apply warning: 1, 7867308
2016-07-25 15:58:17 18920 [Warning] WSREP: Ignoring error for TO isolated action: source: cc757ba3-4e3c-11e6-8893-8b18f5f1ec79 version: 3 local: 0 state: APPLYING flags: 65 conn_id: 1527 trx_id: -1 seqnos (l: 628, g: 7867308, s: 7867307, d: 7867307, ts: 5869102727335473)

根据官方所述:

SCHEMA UPGRADES

Any DDL statement that runs for the database, such as CREATE TABLE or GRANT, upgrades the schema. These DDL statements change the database itself and are non-transactional.

Galera Cluster processes schema upgrades in two different methods:

  • Total Order Isolation (TOI) Where the schema upgrades run on all cluster nodes in the same total order sequence, preventing other transations from committing for the duration of the operation.
  • Rolling Schema Upgrade (RSU) Where the schema upgrades run locally, affecting only the node on which they are run. The changes do not replicate to the rest of the cluster.

You can set the method for online schema upgrades by using the wsrep_OSU_method parameter in the configuration file, (my.ini or my.cnf, depending on your build) or through the MySQL client. Galera Cluster defaults to the Total Order Isolation method.

根据http://galeracluster.com/documentation-webpages/schemaupgrades.html的说明,在TOI模式下,galera cluster会等待当前未提交的事务提交,然后复制DDL到所有的节点确保一致性。

而事实上,根据实际的情况来看,Galera先复制DDL到了其他节点,并被执行,而此时本地尚未执行。如果本地节点因为某种原因比如长时间具有未提交的dml,则可能因为被取消或者超时而导致本地节点最后DDL执行失败。这就会出现galera cluster节点间schema不一致的情况。

galera cluster DDL节点间状态不一致的问题的更多相关文章

  1. 一次galera cluster集群故障节点无法启动问题排查

    现象 环境: Server version: 10.0.25-MariaDB-wsrep MariaDB Server, wsrep_25.13.raf7f02e 配置文件: [root@node-2 ...

  2. 从 MySQL+MMM 到 MariaDB+Galera Cluster : 一个高可用性系统改造

    很少有事情比推出高可用性(HA)系统之后便经常看到的系统崩溃更糟糕.对于我们这个Rails运行机的团队来说,这个失效的HA系统是MySQL多主复制管理器(MMM). 我们已经找寻MMM的替代品有一段时 ...

  3. Galera Cluster——一种新型的高一致性MySQL集群架构

    原文链接:https://www.sohu.com/a/147032902_505779,最近被分配定位mysql的问题,学习下. 1. 何谓Galera Cluster 何谓Galera Clust ...

  4. Centos7.5基于MySQL5.7的 InnoDB Cluster 多节点高可用集群环境部署记录

    一.   MySQL InnoDB Cluster 介绍MySQL的高可用架构无论是社区还是官方,一直在技术上进行探索,这么多年提出了多种解决方案,比如MMM, MHA, NDB Cluster, G ...

  5. mysql galera cluster 集群的分裂与仲裁机制

    集群的分裂 当集群由于网络原因分裂为几个单独的组时(一组可能是单节点,也可能是几个互联的节点),数据出现不一致,此时可能产生脑裂及数据不一致.这种情况 下,只有一组节点能够继续提供服务,这组节点的状态 ...

  6. 利用MariaDB Galera Cluster实现mariadb的多主复制

    一.MariaDB Galera Cluster概要: .简述: MariaDB Galera Cluster 是一套在mysql innodb存储引擎上面实现multi-master及数据实时同步的 ...

  7. MariaDB集群Galera Cluster的研究与测试

    MariaDB集群Galera Cluster的研究与测试 Galera Cluster是MariaDB的一个双活多主集群,其可以使得MariDB的所有节点保持同步,Galera为MariaDB提供了 ...

  8. MariaDB Galera Cluster集群

    一.MariaDB Galera Cluster概要: 1.简述: MariaDB Galera Cluster 是一套在mysql innodb存储引擎上面实现multi-master及数据实时同步 ...

  9. 构建 MariaDB Galera Cluster 分布式数据库集群(一)

    MariaDB Galera Cluster 介绍 简介 MariaDB集群是MariaDB同步多主机集群,仅支持XtraDB(详见本文结尾注释)/InnoDB存储引擎(虽然有对MyISAM实验支持 ...

随机推荐

  1. DVI-A、DVI-D、DVI-I接口定义、DVI接口图和DVI接口标准介绍

    http://blog.csdn.net/cd520yy/article/details/16993179

  2. HTTP 头部详细解释

    HTTP 头部解释 ================================================   Accept 告诉WEB服务器自己接受什么介质类型,*/* 表示任何类型,ty ...

  3. RTImageAssets 自动生成 AppIcon 和 @2x @1x 比例图片

    下载地址:https://github.com/rickytan/RTImageAssets 此插件用来生成 @3x 的图片资源对应的 @2x 和 @1x 版本,只要拖拽高清图到 @3x 的位置上,然 ...

  4. Unity 坐标系

    Unity 使用的是左手坐标系

  5. 爬虫技术 -- 进阶学习(七)简单爬虫抓取示例(附c#代码)

    这是我的第一个爬虫代码...算是一份测试版的代码.大牛大神别喷... 通过给定一个初始的地址startPiont然后对网页进行捕捉,然后通过正则表达式对网址进行匹配. List<string&g ...

  6. iOS-分段控制器-基本概念

    可以直接复制使用 #import "FirstViewController.h" #import "Masonry.h" @interface FirstVie ...

  7. [git]修改commit

    git commit --amend 修改上一个的commit信息. git reset commit_id 修改commit,同时改变commit历史,可用于合并commit. git revert ...

  8. Python装饰器由浅入深

    装饰器的功能在很多语言中都有,名字也不尽相同,其实它体现的是一种设计模式,强调的是开放封闭原则,更多的用于后期功能升级而不是编写新的代码.装饰器不光能装饰函数,也能装饰其他的对象,比如类,但通常,我们 ...

  9. 警惕SQL语句陷井

    以下SQL段,大家认为结果是什么呢? DECLARE @A VARCHAR(50) SET @A='Zuowenjun.cn' SELECT TOP 1 @A=ISNULL(FIELDNAME,'DE ...

  10. CMD魔法堂:获取进程路径和PID值的方法集

    一.前言    在开发发布更更新工具——更新Weblogic应用模块时,了解到更新Weblogic应用需要先关闭Weblogic应用窗口然后是清缓存.更新应用文件,最后再重启Weblogic应用窗口. ...