Add a second sync for help in debugging.
authorGreg Sabino Mullane <greg@endpoint.com>
Sun, 26 Jun 2011 03:24:38 +0000 (23:24 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Sun, 26 Jun 2011 03:24:38 +0000 (23:24 -0400)
Bucardo.pm
t/20-mysql.t

index 8ffa7affd8adf6248371c203939f357ebad06225..da6983eff9597a35f37ea70c698618680f69cb8d 100644 (file)
@@ -2392,6 +2392,7 @@ sub start_kid {
             $x->{dbh}->rollback();
 
             $x->{dbh}->do('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE READ WRITE');
+            $self->glog(qq{Set db "$dbname" to serializable}, LOG_DEBUG);
         }
 
         ## We may want to lock all the tables
@@ -2776,7 +2777,7 @@ sub start_kid {
                     }
                 }
 
-                $self->glog("Sequence from db $g->{winning_db} is the highest", LOG_DEBUG);
+                $self->glog("Sequence $S.$T from db $g->{winning_db} is the highest", LOG_DEBUG);
 
                 ## Now that we have a winner, apply the changes to every other PG database
                 $deltacount{sequences} += $self->adjust_sequence($g, $sync, $S, $T, $syncname);
index c983850d92a092d8f53e510b15c18365bbe06163..34db5e70f79e3fa630604b47fcc0be5f13b8bef8 100644 (file)
@@ -42,9 +42,6 @@ use BucardoTesting;
 ## For now, remove the bytea table type as we don't have full MySQL support yet
 delete $tabletype{bucardo_test8};
 
-## Also cannot handle multi-column primary keys
-#delete $tabletype{bucardo_test2};
-
 my $numtabletypes = keys %tabletype;
 plan tests => 119;
 
@@ -151,7 +148,11 @@ $command =
 $res = $bct->ctl($command);
 like ($res, qr/Added sync "mysql"/, $t);
 
-## Start up Bucardo with this new sync
+## Create a second sync, solely for multi-sync interaction issues
+$bct->ctl('bucardo add dbgroup t1 A:source B C');
+$bct->ctl('bucardo add sync tsync1 herd=therd dbs=t1 ping=true');
+
+## Start up Bucardo with these new syncs
 $bct->restart_bucardo($dbhX);
 
 ## Get the statement handles ready for each table type