Multi-source replication for MariaDB is here

I yesterday finished the work for the first version of multi-source replication for MariaDB.

I first want to thank Peng Lixun at Taobao for giving us the code that I used as a base for this patch. Their patch worked and was used in production, but didn't have all the features needed for a 'full solution'. I have now added those.

Typical use cases for multi-source replication are:
  • You are partitioning your data over many masters and would like to get it all together on one machine to do analytical queries on all data.
  • You have many databases spread over many MariaDB/MySQL servers and would like to have all of them on one machine as an extra backup.
The new syntax introduced to handle many connections:
  • CHANGE MASTER ["connection_name"] ...
  • FLUSH RELAY LOGS ["connection_name"]
  • MASTER_POS_WAIT(....,["connection_name"])
  • RESET SLAVE ["connection_name"]
  • SHOW RELAYLOG ["connection_name"] EVENTS
  • SHOW SLAVE ["connection_name"] STATUS
  • START SLAVE ["connection_name"...]]
  • STOP SLAVE ["connection_name"] ...
"connection_name" specifies with master you are working with.
The original old-style connection_name is an empty string ''.

Full documentation for the multi-source feature can be found here.
Feel free to add comments to the above page if you have any questions!

This is now pushed into the 10.0-MariaDB tree and will be merged into the MariaDB 10.0 tree to be included into MariaDB 10.0.0 in a few days.

By the way:
For those that missed the announcement, another new exciting thing that just was made available in MariaDB is the Cassandra storage engine.


Mark Dhas said...

Great work! Kudos to you and your team.

sherpa said...

Thanks for this. exactly what we wanted for setting up a dedicated backup MariaDB server.