近期某个系统中的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. css3整理--::selection

    ::selection作用: 当使用鼠标选择文本时,改版被选中文本的背景色和前景色.(默认情况下,window中背景色是深蓝色,前景色是白色.) ::selection语法: /*Mozilla Fi ...

  2. 使用SharePoint Designer定制开发员工工作日志系统实例!

    昨天已介绍了一篇<使用SharePoint Designer定制开发专家库系统实例!>,今天继续来介绍使用SharePoint Designer定制开发员工工作日志系统实例,主要功能包括填 ...

  3. jsp页面间传递参数 中文乱码问题(zz)

      jsp页面间传递参数 中文乱码问题 1.传递参数 var url = "*****Test.jsp?param1="+encodeURI(encodeURI(str));//对 ...

  4. 审核流(2)流程设计-SNF.WorkFlow功能使用说明--SNF快速开发平台3.1

    流程设计 图形化的流程设计,更方便.直观 1.打开“流程设计“程序,如上.点击”新建“如下: 2.红色部分为必填项,审批对象是选择要审批的程序菜单,单据名称是在审核流流转时用于提示的单据名称,还要选择 ...

  5. 正确理解静态Static关键字

    与其他语言不通,C#没有全局变量和全局函数的感念,C#的所有字段和方法都出现在一个类的上下文中,在C#中与全局字段或函数等价的就是静态字段或方法.“全局字段或方法”与“C#的静态字段或方法”没有功能上 ...

  6. android自定义之 5.0 风格progressBar

    最近做项目,用到了ProgressBar ,就想到了要使用Android5.0 的效果,就随手实现了一下. 效果图: 大概的思路: 1. 圆圈通过Canvas去绘制 2.圆圈的动画通过Animator ...

  7. [SLAM] Studying Guidance

    Books from Zhihu: 幽默一把 看完Gonzalez:嗯,好像很好玩的样子,我也来搞一搞.看完Price:什么鬼,怎么这么多公式,公式看不懂肿么破.看完Szeliski:原来用一千页的书 ...

  8. [Python] Symbol Review

    From:http://learnpythonthehardway.org/book/ex37.html 1. with X as Y: pass 1.1 yield 2. exec 2.1 name ...

  9. 清除WebLogic8.1缓存

    在Domain目录下面有一个以server命名的文件夹,删除整个文件夹就可以了.

  10. iOS-UISegmentedControl-隐藏边框

    原理: 1. 用tintColor属性,把整个UISEgmentControl 设置成为透明色. 2. 设置正常状态下的titleTextAttributes.和选中状态下的titleTextAttr ...