Giter Club home page Giter Club logo

Comments (9)

tanji avatar tanji commented on July 20, 2024

That's the default behavior in latest version.

$ ./mariadb-repmgr -help
Usage of ./mariadb-repmgr:
-maxdelay=0: Maximum replication delay before initiating failover

Use -maxdelay with the value of your choice.

from mariadb-tools.

cpeintre avatar cpeintre commented on July 20, 2024

Sorry, I wasn't clear enough.
The problem occurs even if this parameter is set correctly (greater than 0)

from mariadb-tools.

tanji avatar tanji commented on July 20, 2024

OK, noted. I'll try to reproduce it.

from mariadb-tools.

tanji avatar tanji commented on July 20, 2024

OK, I suppose that happens because you use -gtidcheck=true, and that option is misdocumented and misleading (and honestly, should maybe be removed)
If you use that, failover will never happen if slaves have a different Current_GTID position from the master.
However, if you don't use it, and slaves are not beyond maxdelay, the utility will pick up the most up to date slave and will wait for GTID to synchronize before switching.
So to be clear, -gtidcheck=true is not a means to sync the slaves with the master. It's just a hardcore option to make sure that one slave is 100% in sync at switchover time.

from mariadb-tools.

cpeintre avatar cpeintre commented on July 20, 2024

Ok, understood. I found the name of this option really comfortable ;-)
Thanks for the explanations.

from mariadb-tools.

cpeintre avatar cpeintre commented on July 20, 2024

Now, a switch over with lag on all slaves result with this error on all slaves:
"Got fatal error 1236 from master when reading data from binary log: 'Error: connecting slave requested to start from GTID 1-180533626-14016589, which is not in the master's binlog"

from mariadb-tools.

tanji avatar tanji commented on July 20, 2024

Issue confirmed.

from mariadb-tools.

tanji avatar tanji commented on July 20, 2024

The reason for that issue is that switchover may happen before all transactions have completed on demoted master. It causes inconsistency in the replication setup as the new master will be behind some slaves. Looking at that I found other issues, because closing existing transactions is not handled yet. Expect some form of bug fix soon.

from mariadb-tools.

tanji avatar tanji commented on July 20, 2024

repmgr now correctly handles running threads on demoted master.
There is a configurable killswitch: -wait-kill: number of milliseconds to wait before killing connections on demoted master, if write threads are present. Reads or sleeping connections are killed no matter what.

from mariadb-tools.

Related Issues (11)

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.