Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync will stop when 1 server is down. #74

Closed
bruno911 opened this issue Feb 6, 2014 · 10 comments
Closed

Sync will stop when 1 server is down. #74

bruno911 opened this issue Feb 6, 2014 · 10 comments

Comments

@bruno911
Copy link

bruno911 commented Feb 6, 2014

Hi All,
First I would like to congratulate every contributor as bucardo 4.99.11 is working really well.
I notice, well maybe is a known issue, that if 1 server is down everything will stop without error messages. Consider this scenario:

db1<=>db2<=>db3
bucardo add db db1
bucardo add db db2
bucardo add db db3

bucardo add table tbl_test herd=therd

bucardo add dbgroup tgroup db1:source db2:source db3:source

bucardo add sync foobar relgroup=therd dbs=tgroup

Then if I switch off db3, the sync between db1<=>db2 will also stop.

Even if I create 2 different syncs:
db1<=>db2
db1<=>db3

if one is off everything will stop. The work around I found for that is to create a node js script that will connect the servers and when one server goes down it will create all the syncs again excluding the server that is down, and then when that server come up, node js will run the commands to add a sync will all the databases, the problem with this is that most of the time some rows are missing.

Best regards,
Bruno Quintana.

@teejteej
Copy link

teejteej commented Feb 6, 2014

I've noticed the same thing with this version. It resulted in a lot of missing records when a server went down.

@bruno911
Copy link
Author

@teejteej : Are you using my same/similar workaround? or do you face this issue without removing the unavailable server from the sync? Because I haven't face this problem when a server is down and then it come up if I don't modify the sync, or at least I haven't notice it yet.

@teejteej
Copy link

I haven't used the workaround; it happened without removing the unavailable server. I still have to investigate what exactly happened, it may seem to have been something that started with sync conflicts.

@nav
Copy link

nav commented Apr 16, 2014

I too am looking for a workaround to this issue.

@eggyknap
Copy link
Collaborator

Re-creating the scripts without the failed server is an interesting way to go about it, but it seems prone to heavy locking, and error, such as what you've discovered. Another possibility would be to add one sync from the master to each slave database in the relgroup. So instead of this:

bucardo add dbgroup tgroup db1:source db2:source db3:source
bucardo add sync foobar relgroup=therd dbs=tgroup

Do this:

bucardo add sync slave2 relgroup=therd dbs=db1:master,db2:source
bucardo add sync slave3 relgroup=therd dbs=db1:master,db3:source

... and so on

@nav
Copy link

nav commented Apr 16, 2014

Consider the following scenario:

bucardo add sync MMS1 relgroup=R1 dbs=MASTER1:source,MASTER2:source
bucardo add sync MSS1 relgroup=R1 dbs=MASTER1:source,SLAVE1:target
bucardo add sync MSS2 relgroup=R1 dbs=MASTER1:source,SLAVE2:target

If the MASTER2 db is down, the MSS1 and MSS2 syncs stop.

Is this how it's supposed to work?

@jimmycdinata
Copy link

@eggyknap
Is this will solve the sync will stop issues?

@eggyknap
Copy link
Collaborator

eggyknap commented Jun 2, 2014

My comment didn't consider a multi-master scenario, and I'm not immediately sure what's going on in @nav's case. I don't have time to look closely just now. @jimmycdinata, my suggestion should stop some kinds of sync issues, but I don't know specifically which problems you have in mind.

@umttt
Copy link

umttt commented Jan 6, 2015

Hi. The problem still occurs in version 5.0.0. Is this solved in version 5.3.0 ?

@jonjensen
Copy link
Member

Closing older issues that do not clearly indicate a Bucardo bug we can act on. If you can show a reproduceable problem on the current version of Bucardo, please share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants