[MXS-2542] Add rebuild server to MariaDB Monitor Created: 2019-06-04  Updated: 2023-05-08  Resolved: 2022-07-22

Status: Closed
Project: MariaDB MaxScale
Component/s: mariadbmon
Affects Version/s: None
Fix Version/s: 22.08.0

Type: New Feature Priority: Major
Reporter: Todd Stoffel (Inactive) Assignee: Esa Korhonen
Resolution: Fixed Votes: 3
Labels: Rebuild, Slave

Issue Links:
Relates
relates to MDEV-15610 Add SST for asynchronous slaves Closed
relates to MDEV-21106 Port clone plugin from MySQL Open
relates to MDEV-7502 Automatic provisioning of slave Open
relates to MDEV-20996 Maxscale auto-failover with semi-sync... Closed
Sprint: MXS-SPRINT-144, MXS-SPRINT-157, MXS-SPRINT-158, MXS-SPRINT-159, MXS-SPRINT-160, MXS-SPRINT-162

 Description   

It would be nice to add a feature to MaxScale that could rebuild a corrupted machine or automatically build a new replica. That replica should then automatically join an existing cluster. This could be accomplished in a similar method that is used with Galera SST.

On the current master:

1. Launch MariaBackup
2. Create a streaming snapshot of the datadir using xbstream/mbstream
3. Compress with a utility like pigz for minimal transfer time
4. Stream to the joiner/replica server with socat.

On the joining node:

1. Receive the socat stream
2. Decompress
3. Prepare MariaBackup
4. Find the GTID position
5. Register with the existing master / MaxScale
6. Start slave replication



 Comments   
Comment by markus makela [ 2019-06-18 ]

Might be a nice feature to integrate into the server as a new replication command. A sort of a dump thread could send fake replicated events until a known GTID position is reached. When the position is reached, normal replication would start. You'd essentially cause the whole database to be replicated to a slave via the replication protocol.

Looks like MDEV-15610 describes one way to do it.

Comment by Geoff Montee (Inactive) [ 2019-11-20 ]

If MDEV-21106 were implemented in MariaDB Server, then MaxScale could use the clone plugin for this.

Comment by Max Mether [ 2022-04-21 ]

I assume this ticket is for a generic solution, not for SkySQL only? I am also worried about how exactly SkySQL clones servers, there has been issues with that process in the past.

In any case, this feature is requested by a large amount of users and customers and having it in MaxScale is a great compelling solution.

Generated at Thu Feb 08 04:14:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.