MySQL Forums
Forum List  »  Replication

(solution?) Re: Replication - always broken when poweroff one of the nodes
Posted by: TOMASZ SERWANSKI
Date: October 01, 2017 07:46PM

Hello,

As it seems I found kind of workaround, let me present it here; on one hand it may be useful for someone, on the other - maybe logic behind this workaround is wrong, and may lead to problems; if anyone is aware it may, share please.

So:
1) finally decided to use GITD; it behaves in similar way (master-> slave works fine, master crashes then slave took its role (works fine), but recovered master was unable to replicate to new master / old slave)
2) in case of GITD there is no need to provide details related to master pos when slave is being reset
3) due to above, decided to fire script during server boot; this script calls other sql node, and executes: stop slave; reset slave; start slave;
4) above gives me:
- recovered master is able to act (if new master would fail) as master again (if becomes master, it will be able to replicate to new slave / old master)
- above gives me opportunity to have some fun - crash one server, let other become master, crash that one, let 'old' one to become master againd and so on - all above without any manual intervention
- only one thing which makes me worry is that at the moment during each boot of 'recovered' node, there is reset of slave called on second node; as far as my imagination reaches it should not cause any problem (considering recovered master is not designed to act as master immadiately after start), but maybe anyone more experienced can imagine case when such a behavior (reset slave on running master) may cause problems? if there is such a risk I overloked, let me know please.

regards
Tomasz

Options: ReplyQuote


Subject
Views
Written By
Posted
(solution?) Re: Replication - always broken when poweroff one of the nodes
443
October 01, 2017 07:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.