onetime Does Not Work in 4.99.6 #37

Open
theory opened this Issue Jan 30, 2013 · 5 comments

Comments

Projects
None yet
4 participants
@theory
Collaborator

theory commented Jan 30, 2013

Tried to set up a two master configuration where one master already had data and the other didn't. Hit reload config and the daemons fired up, which is great, but nothing was copied. I changed a row in the populated master, and the updated data was copied to the other, but none of the existing data was. The onetime attribute was set to 0 after that.

Probably something simple…

@burbon

This comment has been minimized.

Show comment
Hide comment
@burbon

burbon Feb 1, 2013

Contributor

I found that onetimecopy works only for db role target

Bucardo.pm:

     push @dbs_fullcopy => $dbname
         if ($sync->{onetimecopy} and $x->{role} eq 'target')
             or ($sync->{fullcopy} and $x->{role} eq 'fullcopy');
Contributor

burbon commented Feb 1, 2013

I found that onetimecopy works only for db role target

Bucardo.pm:

     push @dbs_fullcopy => $dbname
         if ($sync->{onetimecopy} and $x->{role} eq 'target')
             or ($sync->{fullcopy} and $x->{role} eq 'fullcopy');
@theory

This comment has been minimized.

Show comment
Hide comment
@theory

theory Feb 1, 2013

Collaborator

Hrm. Not familiar with fullcopy will have to look into it.

Collaborator

theory commented Feb 1, 2013

Hrm. Not familiar with fullcopy will have to look into it.

@mnp

This comment has been minimized.

Show comment
Hide comment
@mnp

mnp Mar 29, 2013

Contributor

I'm experimenting with onetimecopy in latest git, a couple revs past 4.99.7, and meeting success. Here's what I can explain. I have a supervisor that waits until the target database comes up. Maybe there's a better way? Meanwhile, my app is running, making local writes to local db. Then, when the supervisor sees the remote db available, it starts bucardo and add my syncs like this:

bucardo add sync sg_sync herd=sgherd conflict_strategy=latest onetimecopy=1 dbs=sggroup

It proceeds with copying to the target at a rate of about 2800 rows/sec in my case. While it's doing this the onetimecopy column in the bucardo.sync db stays "1". Finally, when it's finished copying, that column goes to "0" and regular triggered sync begins.

Let me know If I can answer any questions.

Contributor

mnp commented Mar 29, 2013

I'm experimenting with onetimecopy in latest git, a couple revs past 4.99.7, and meeting success. Here's what I can explain. I have a supervisor that waits until the target database comes up. Maybe there's a better way? Meanwhile, my app is running, making local writes to local db. Then, when the supervisor sees the remote db available, it starts bucardo and add my syncs like this:

bucardo add sync sg_sync herd=sgherd conflict_strategy=latest onetimecopy=1 dbs=sggroup

It proceeds with copying to the target at a rate of about 2800 rows/sec in my case. While it's doing this the onetimecopy column in the bucardo.sync db stays "1". Finally, when it's finished copying, that column goes to "0" and regular triggered sync begins.

Let me know If I can answer any questions.

@theory

This comment has been minimized.

Show comment
Hide comment
@theory

theory Oct 2, 2013

Collaborator

@mnp Is the new database a master in sggroup, or a target?

Collaborator

theory commented Oct 2, 2013

@mnp Is the new database a master in sggroup, or a target?

@ghost ghost assigned theory Oct 2, 2013

@ghost ghost assigned turnstep Oct 16, 2013

@theory

This comment has been minimized.

Show comment
Hide comment
@theory

theory Oct 16, 2013

Collaborator

Reassigned to @turnstep since, via this thread, he's apparently already on the job, at least mentally!

Collaborator

theory commented Oct 16, 2013

Reassigned to @turnstep since, via this thread, he's apparently already on the job, at least mentally!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment