## If we have a custom conflict handler for this goat, invoke it
if ($g->{code_conflict}) {
+
+ $self->glog('Starting code_conflict', LOG_VERBOSE);
+
## We pass it %conflict, and assume it will modify all the values therein
my $code = $g->{code_conflict};
$code->{info}{conflicts} = \%conflict;
## The winner is the latest one to touch any of our tables
## In theory, this is a little crappy.
## In practice, it works out quite well. :)
+
+ $self->glog("Starting 'bucardo_latest' conflict strategy", LOG_VERBOSE);
+
if (! exists $self->{conflictwinner}) {
for my $dbname (@dbs_delta) {
$x = $sync->{db}{$dbname};
+ $self->glog("Conflict check lastmod for $dbname is $x->{lastmod}", LOG_DEBUG);
+
if ($x->{lastmod} > $highest) {
$highest = $x->{lastmod};
$self->{conflictwinner} = $dbname;
## We now have a winning database inside self -> conflictwinner
## This means we do not need to update %conflict at all
+ $self->glog("Conflict winner is $self->{conflictwinner} with $highest", LOG_VERBOSE);
} ## end conflictwinner not set yet
## no updates at all for this run. Note: this does not
## mean no conflicts, it means no insert/update/delete
+ $self->glog("Starting default conflict strategy", LOG_VERBOSE);
+
if (! exists $self->{conflictwinner}) {
## Optimize for a single database name