Giter Club home page Giter Club logo

mariadb-tools's People

Contributors

tanji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mariadb-tools's Issues

Add MaxScale Read router support to repmgr

It would be really handy to have MaxScale support, as it can be controlled by telnet, we would not need no VIP in case of failover. MaxScale would be informed of who is the new master.

[BUG] Switch over with mariadb-repmgr and multi GTID domains looks broken

Original state:

Master Host   Port      Binlog Position  Strict Mode
srv-02         3306 1-180533626-105,2-180533626-1          OFF

 Slave Host   Port  Binlog   Using GTID           Slave GTID   Replication Health  Delay  RO
  srv-03   3306      ON    Slave_Pos 1-180533626-105,2-180533626-1           Running OK      0  ON
  srv-04   3306      ON  Current_Pos 1-180533626-105,2-180533626-1           Running OK      0  ON
  srv-05   3306      ON    Slave_Pos 1-180533626-105,2-180533626-1           Running OK      0  ON
  srv-06   3306      ON  Current_Pos 1-180533626-105,2-180533626-1           Running OK      0  ON

Then, state after a switch over:

Master Host   Port      Binlog Position  Strict Mode
srv-03         3306       1-180533627-92          OFF

 Slave Host   Port  Binlog   Using GTID           Slave GTID   Replication Health  Delay  RO
  srv-02   3306      ON  Current_Pos      1-180533630-104           Running OK      0  ON
  srv-04   3306      ON  Current_Pos 1-180533626-105,2-180533626-1           Running OK      0  ON
  srv-05   3306      ON    Slave_Pos 1-180533626-105,2-180533626-1           Running OK      0  ON
  srv-06   3306      ON  Current_Pos 1-180533626-105,2-180533626-1           Running OK      0  ON

The new master and the old master are not in sync with other slaves.

State after a new transaction:

Master Host   Port      Binlog Position  Strict Mode
srv-03         3306      1-180533627-106          OFF

 Slave Host   Port  Binlog   Using GTID           Slave GTID   Replication Health  Delay  RO
  srv-02   3306      ON  Current_Pos      1-180533627-106           Running OK      0  ON
  srv-04   3306      ON  Current_Pos 1-180533627-106,2-180533626-1           Running OK      0  ON
  srv-05   3306      ON    Slave_Pos 1-180533627-106,2-180533626-1           Running OK      0  ON
  srv-06   3306      ON  Current_Pos 1-180533627-106,2-180533626-1           Running OK      0  ON

Switch over is no longer possible.

[BUG] Switch over with mariadb-repmgr generates an inconsistent state for GTID

Original state:

Master Host   Port      Binlog Position  Strict Mode
srv-01         3306      1-180533630-102          OFF

 Slave Host   Port  Binlog   Using GTID           Slave GTID   Replication Health  Delay  RO
  srv-02      3306      ON    Slave_Pos      1-180533630-102           Running OK      0  ON
  srv-03      3306      ON  Current_Pos      1-180533630-102           Running OK      0  ON
  srv-04      3306      ON    Slave_Pos      1-180533630-102           Running OK      0  ON
  srv-05      3306      ON  Current_Pos      1-180533630-102           Running OK      0  ON

Then, perform a switch over:

Master Host   Port      Binlog Position  Strict Mode
srv-05          3306      1-180533626-101          OFF

 Slave Host   Port  Binlog   Using GTID           Slave GTID   Replication Health  Delay  RO
  srv-02      3306      ON    Slave_Pos      1-180533630-102           Running OK      0  ON
  srv-03      3306      ON  Current_Pos      1-180533630-102           Running OK      0  ON
  srv-04      3306      ON    Slave_Pos      1-180533630-102           Running OK      0  ON
  srv-01      3306      ON  Current_Pos      1-180533626-101           Running OK      0  ON

GTID is not equal between master and slaves.
A new switch over triggers errors:

2015/01/29 14:36:54 Electing a new master
2015/01/29 14:36:54 Processing %s candidates 4
2015/01/29 14:36:54 Connecting to slave srv-02:3306
2015/01/29 14:36:54 WARNING: Slave srv-02:3306 not in sync. Skipping
2015/01/29 14:36:54 Connecting to slave srv-02:3306
2015/01/29 14:36:54 WARNING: Slave srv-02:3306 not in sync. Skipping
2015/01/29 14:36:54 Connecting to slave srv-02:3306
2015/01/29 14:36:54 WARNING: Slave srv-02:3306 not in sync. Skipping
2015/01/29 14:36:54 Connecting to slave srv-02:3306
2015/01/29 14:36:54 WARNING: Slave srv-02:3306 not in sync. Skipping
2015/01/29 14:36:54 ERROR: No suitable candidates found.

New transaction needed on master to retrieve a correct state:

Master Host   Port      Binlog Position  Strict Mode
srv-05         3306      1-180533626-103          OFF

 Slave Host   Port  Binlog   Using GTID           Slave GTID   Replication Health  Delay  RO
  srv-02      3306      ON    Slave_Pos      1-180533626-103           Running OK      0  ON
  srv-03      3306      ON  Current_Pos      1-180533626-103           Running OK      0  ON
  srv-04      3306      ON    Slave_Pos      1-180533626-103           Running OK      0  ON
  srv-01      3306      ON  Current_Pos      1-180533626-103           Running OK      0  ON

Writing on a slave causes replication breakage when switching over

As any write on a slave will change current_pos to include the GTID of the write on the slave, when switching over, the slave will look for that GTID in the new master. This will cause replication to break.

Possible solutions: use gtid_slave_pos to initialize replication. Parse gtid_binlog_state to get the correct GTID.

servercheck: ability to connect via TCP instead of socket

Although socket sounds the most natural and optimal way of connecting, adding TCP would add flexibility and enable a few other usage scenarios, such as non-local and/or containerized deployments.

Questions:

  • Is such feature supported? (I've looked at the code, but found nothing)
  • Is there interest in it? Would you have time/bandwith/need on coding it?
  • Would a suitable PR be accepted? (I'm not very deep in Go, but looks like a low hanging fruit and I might take a stab at it)
  • Which command-line switch name would be appropiate?

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.