Giter Site home page Giter Site logo

Comments (18)

mrzhuhelloworld avatar mrzhuhelloworld commented on August 13, 2024

另外想问下生产有在用MHA-Re吗

from mha-re-edition.

hcymysql avatar hcymysql commented on August 13, 2024

好的。我修正一下,感谢。

from mha-re-edition.

hcymysql avatar hcymysql commented on August 13, 2024

另外想问下生产有在用MHA-Re吗

是的,已经部署在生产环境里了。

from mha-re-edition.

mrzhuhelloworld avatar mrzhuhelloworld commented on August 13, 2024

image
另外切换的时候发现不会找到有最新gtid的从库来作为新主。

from mha-re-edition.

hcymysql avatar hcymysql commented on August 13, 2024

image 另外切换的时候发现不会找到有最新gtid的从库来作为新主。

已修复。

变更如下:
#new_master_info_sort = sorted(new_master_info, reverse=True)
new_master_info_sort = sorted(new_master_info) # 选举GTID最新的候选主库

from mha-re-edition.

hcymysql avatar hcymysql commented on August 13, 2024

image 另外切换的时候发现不会找到有最新gtid的从库来作为新主。

你再重新拉取一下masterha_manager_mysql.py文件,我又重新调整了一下。

from mha-re-edition.

mrzhuhelloworld avatar mrzhuhelloworld commented on August 13, 2024

新拉取的代码在主库主动shutdown的时候,守护进程会崩掉,只进行到删除vip,后面步骤没有做,是不是哪个变量需要全局声明一下
主库shutdown的时候故意整了下延迟,当时是有延迟的
image

image

from mha-re-edition.

hcymysql avatar hcymysql commented on August 13, 2024

图片
你是怎么模拟的延迟?我这边没有复现出来。

from mha-re-edition.

mrzhuhelloworld avatar mrzhuhelloworld commented on August 13, 2024

步骤:
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.

mrzhuhelloworld avatar mrzhuhelloworld commented on August 13, 2024

3.通过vip对主库3304写数据100秒; ----这一步是通过sysbench

from mha-re-edition.

hcymysql avatar hcymysql commented on August 13, 2024

步骤: 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.

mrzhuhelloworld avatar mrzhuhelloworld commented on August 13, 2024

mha-re_ha_error

from mha-re-edition.

hcymysql avatar hcymysql commented on August 13, 2024

新拉取的代码在主库主动shutdown的时候,守护进程会崩掉,只进行到删除vip,后面步骤没有做,是不是哪个变量需要全局声明一下 主库shutdown的时候故意整了下延迟,当时是有延迟的 image

image

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.

mrzhuhelloworld avatar mrzhuhelloworld commented on August 13, 2024

image
我这个测试的是多实例的8028社区版本

from mha-re-edition.

hcymysql avatar hcymysql commented on August 13, 2024

wait_gtid_result = mysql_conn_wait.Wait_for_executed_GTID(master_gtid_executed, timeout)
这行代码上面增加
wait_gtid_result = None
你再试试?

from mha-re-edition.

hcymysql avatar hcymysql commented on August 13, 2024

另外,你把MySQL的max_execution_time参数值设置为0

from mha-re-edition.

mrzhuhelloworld avatar mrzhuhelloworld commented on August 13, 2024

好像还真的是这个max_execution_time执行时间限制问题,改为0后验证可以正常ha了,并没有加wait_gtid_result = None,这三个实例都是脚本拉起来的,这些参数并没有规范化设置。

from mha-re-edition.

hcymysql avatar hcymysql commented on August 13, 2024

哦了

from mha-re-edition.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.