New 'quickstart' parameter: allow skipping of remote table/column sanity checks.
authorGreg Sabino Mullane <greg@endpoint.com>
Tue, 28 Oct 2014 22:30:26 +0000 (18:30 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Tue, 28 Oct 2014 22:30:26 +0000 (18:30 -0400)
Bucardo.pm
Changes
bucardo
t/BucardoTesting.pm

index 14b0883225223f23309ceafce580207be41db8eb..5089028c435cbe9bdee35a5fef41468adde1fe4e 100644 (file)
@@ -223,6 +223,7 @@ sub new {
         created      => scalar localtime,
         mcppid       => $$,
         verbose      => 1,
+        quickstart   => 0,
         logdest      => ['.'],#'/var/log/bucardo'],
         warning_file => '',
         logseparate  => 0,
@@ -6815,6 +6816,11 @@ sub validate_sync {
             ## MySQL/MariaDB/Drizzle/Oracle/SQLite is skipped for now, but should be added later
             next if $x->{dbtype} =~ /mysql|mariadb|drizzle|oracle|sqlite/o;
 
+            if ($self->{quickstart}) {
+                $self->glog("quickstart: Skipping table check for $dbname.$S.$T", LOG_VERBOSE);
+                next;
+            }
+
             ## Respond to ping here and now for very impatient watchdog programs
             $maindbh->commit();
 
diff --git a/Changes b/Changes
index 90e5f7e7f727ba753539bad420537c830ec8e70e..fa98151366c1482c2a2396574f7bf95fc3d1b7dd 100644 (file)
--- a/Changes
+++ b/Changes
@@ -4,6 +4,10 @@
 Bucardo version 5.1.3
 
 
+  - quickstart: new parameter to give on startup (e.g. "bucardo start --quickstart"). 
+    When set, skips checking the tables and columns on remote databases.
+    [Greg Sabino Mullane]
+
   - Fix problem of not clearing out stagetable before using it. There was a 
     chance that a previous KID left some rows in there, in which case duplicate 
     entries will appear in bucardo_track.
diff --git a/bucardo b/bucardo
index f89760d133dfe09ce729a57ed203b6f1f691f5df..32218d9db089355eb1816751c14de697108e7a49 100755 (executable)
--- a/bucardo
+++ b/bucardo
@@ -77,6 +77,7 @@ help(1) unless @ARGV;
 my $bcargs = {
               quiet        => 0,
               verbose      => 0,
+              quickstart   => 0,
               bcverbose    => 1,
               dbname       => 'bucardo',
               dbuser       => 'bucardo',
@@ -139,6 +140,7 @@ GetOptions ## no critic (ProhibitCallsToUndeclaredSubs)
      'vvv',
      'vvvv',
      'quiet+',
+     'quickstart',
      'notimer',
      'help|?',
      'debug!',
index 5e4a73de0b5cab7e441e4e74c57d493e16f39850..4da4f5180e48fb843404ad01c9ded630a5f9857c 100644 (file)
@@ -1054,7 +1054,7 @@ sub restart_bucardo {
     $dbh->do('LISTEN bucardo_nosyncs');
     $dbh->commit();
 
-    my $output = $self->ctl('start --exit-on-nosync testing');
+    my $output = $self->ctl('start --exit-on-nosync --quickstart testing');
 
     my $bail = 30;
     my $n;