[Maria-discuss] Does MariaDB support 2 level replication and crash recover from such situation?
Hi, all I am working on MariaDB with replication topology A->B->C, in which B is the slave of A and also the master of C, thus C contains data of both A and B. and A, B would be modified by application, while C be read only. now let B crash, I alter A to let it be the new master of C, and this time C would be modified by application. then after a period of time, B restart, this time I need let C be the master of B, and I need B has the same data with A and C, thus the topology change from A->B->C to A->C->B. Does this be possible? (I set skip-slave-start for all servers.) Regards.
----- Original Message -----
Hi, all
I am working on MariaDB with replication topology A->B->C, in which B is the slave of A and also the master of C, thus C contains data of both A and B. and A, B would be modified by application
To modify A and B they need to replicate to each other. If you do it it an incompatible way, like changing the same row on both at the same time, replication between them will break. Don't write to two nodes unless you have a fail proof way of preventing this.
, while C be read only.
now let B crash, I alter A to let it be the new master of C, and this time C would be modified by application.
then after a period of time, B restart, this time I need let C be the master of B, and I need B has the same data with A and C, thus the topology change from A->B->C to A->C->B.
Does this be possible?
yes. Its sanity depends on more factors that what you;ve described. Ensure log-slave-updates is on all nodes. Using gtid replication will help you. Read the docs for this. -- Daniel Black, Engineer @ Open Query (http://openquery.com.au) Remote expertise & maintenance for MySQL/MariaDB server environments.
On Tue, Dec 30, 2014 at 1:33 AM, Daniel Black <daniel.black@openquery.com> wrote:
I am working on MariaDB with replication topology A->B->C, in which B is the slave of A and also the master of C, thus C contains data of both A and B. and A, B would be modified by application
To modify A and B they need to replicate to each other. If you do it it an incompatible way, like changing the same row on both at the same time, replication between them will break.
Don't write to two nodes unless you have a fail proof way of preventing this.
, while C be read only.
now let B crash, I alter A to let it be the new master of C, and this time C would be modified by application.
then after a period of time, B restart, this time I need let C be the master of B, and I need B has the same data with A and C, thus the topology change from A->B->C to A->C->B.
Does this be possible?
yes. Its sanity depends on more factors that what you;ve described.
Ensure log-slave-updates is on all nodes.
Using gtid replication will help you. Read the docs for this.
Note that even GTID will help here only if A and B use different domain_id for all their transactions. And I guess C should use the same domain_id as B when it becomes writable. Pavel
participants (3)
-
Daniel Black
-
Pavel Ivanov
-
司同