Comments (9)
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.
Sorry, I wasn't clear enough.
The problem occurs even if this parameter is set correctly (greater than 0)
from mariadb-tools.
OK, noted. I'll try to reproduce it.
from mariadb-tools.
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.
Ok, understood. I found the name of this option really comfortable ;-)
Thanks for the explanations.
from mariadb-tools.
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.
Issue confirmed.
from mariadb-tools.
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.
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)
- Ability to choose the new master manually HOT 3
- Ability to consider the old master as dead HOT 1
- Add a real debug option for mariadb-repmgr HOT 3
- [BUG] Switch over with mariadb-repmgr could result all slaves pointing on 127.0.0.1
- [BUG] Switch over with mariadb-repmgr generates an inconsistent state for GTID HOT 13
- Add MaxScale Read router support to repmgr HOT 1
- [BUG] Switch over with mariadb-repmgr and multi GTID domains looks broken HOT 4
- Need a way to specify MASTER_CONNECT_RETRY on mariadb-repmgr HOT 3
- Writing on a slave causes replication breakage when switching over
- servercheck: ability to connect via TCP instead of socket HOT 2
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 mariadb-tools.