Comments (18)
另外想问下生产有在用MHA-Re吗
from mha-re-edition.
好的。我修正一下,感谢。
from mha-re-edition.
另外想问下生产有在用MHA-Re吗
是的,已经部署在生产环境里了。
from mha-re-edition.
from mha-re-edition.
已修复。
变更如下:
#new_master_info_sort = sorted(new_master_info, reverse=True)
new_master_info_sort = sorted(new_master_info) # 选举GTID最新的候选主库
from mha-re-edition.
你再重新拉取一下masterha_manager_mysql.py文件,我又重新调整了一下。
from mha-re-edition.
新拉取的代码在主库主动shutdown的时候,守护进程会崩掉,只进行到删除vip,后面步骤没有做,是不是哪个变量需要全局声明一下
主库shutdown的时候故意整了下延迟,当时是有延迟的
from mha-re-edition.
from mha-re-edition.
步骤:
1.masterha_manager_mysql 启动守护进程 ,主库3304,从库3305,3307
2.从库3305和从库3307 stop slave;
3.通过vip对主库3304写数据100秒;
4.写完数据后从库3305,3307 start slave;
5.masterha_check_repl_mysql检查下同步链路正常,但是两个从库有延迟了。
6.目前从库还有延迟,模拟主库3304突然宕机,主库执行shutdown;
7.守护进程的log一直在tailf 就出现上面的报错了。
from mha-re-edition.
3.通过vip对主库3304写数据100秒; ----这一步是通过sysbench
from mha-re-edition.
步骤: 1.masterha_manager_mysql 启动守护进程 ,主库3304,从库3305,3307 2.从库3305和从库3307 stop slave; 3.通过vip对主库3304写数据100秒; 4.写完数据后从库3305,3307 start slave; 5.masterha_check_repl_mysql检查下同步链路正常,但是两个从库有延迟了。 6.目前从库还有延迟,模拟主库3304突然宕机,主库执行shutdown; 7.守护进程的log一直在tailf 就出现上面的报错了。
我复现了这个操作,并且录制了视频,你看看。
https://pan.baidu.com/s/17aCtGe7lS_Z85Ma5P3e-0g
提取码:drm0
但没有遇到过该错误。
from mha-re-edition.
from mha-re-edition.
新拉取的代码在主库主动shutdown的时候,守护进程会崩掉,只进行到删除vip,后面步骤没有做,是不是哪个变量需要全局声明一下 主库shutdown的时候故意整了下延迟,当时是有延迟的
wait_gtid_result = None #增加一下这个
wait_gtid_result = mysql_conn_wait.Wait_for_executed_GTID(master_gtid_executed, timeout)
另外,你的数据库版本是?
SELECT WAIT_FOR_EXECUTED_GTID_SET('3E11FA47-71CA-11E1-9E33-C80AA9429562:1-5',1);
这个SQL,你那边能执行吗?是否返回的是1?
from mha-re-edition.
from mha-re-edition.
在wait_gtid_result = mysql_conn_wait.Wait_for_executed_GTID(master_gtid_executed, timeout)
这行代码上面增加
wait_gtid_result = None
你再试试?
from mha-re-edition.
另外,你把MySQL的max_execution_time参数值设置为0
from mha-re-edition.
好像还真的是这个max_execution_time执行时间限制问题,改为0后验证可以正常ha了,并没有加wait_gtid_result = None,这三个实例都是脚本拉起来的,这些参数并没有规范化设置。
from mha-re-edition.
哦了
from mha-re-edition.
Related Issues (12)
- 源代码 HOT 15
- 级联主库 HOT 3
- 只读配置问题 HOT 1
- ubuntu 能否适配,centos已停止维护 HOT 1
- binlog server配置 HOT 1
- 源代码开放吗? HOT 1
- Manager能否跑多个? HOT 2
- 当主库遇到网络问题时,无法进行切换 HOT 2
- vip 问题 HOT 3
- 数据库连接未正常关闭问题 HOT 3
- 代码压缩包已坏
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mha-re-edition.