Fellow Bucardoans,

At a quick glance, I see no support for two-phase commit in the 5.0 code base. 
Given its support for a multi-master replication factor greater than 2, it 
seems to me that it would be useful to have. I'm thinking that this is the key 
bit of code:

            $self->glog(q{Issuing final commit for all databases}, LOG_VERBOSE);
            ## This is a tricky bit: all writeable databases *must* go first
            ## If we only have a single source, this ensures we don't mark rows 
as done
            ## in the track tables before everyone has reported back
            for my $dbname (@dbs_dbi) {
                next if ! $x->{writtento};
                $sync->{db}{$dbname}{dbh}->commit();
            }
            ## Now we can commit anyone else
            for my $dbname (@dbs_dbi) {
                next if $x->{writtento};
                $sync->{db}{$dbname}{dbh}->commit();
            }

So good that it commits the databases written to, first. But what happens if 
there are three being written to, the first two commit, but the last one fails? 
Shouldn't the first two really be rolled back, then? Two-phase commit on 
databases that support it would allow that.

Thanks,

David

_______________________________________________
Bucardo-general mailing list
[email protected]
https://mail.endcrypt.com/mailman/listinfo/bucardo-general

Reply via email to