When a kid does a rollback (e.g. serialization error), make sure we re-disable the...
authorGreg Sabino Mullane <greg@endpoint.com>
Sat, 23 May 2015 16:22:03 +0000 (12:22 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Sat, 23 May 2015 16:22:03 +0000 (12:22 -0400)
Long-term we need to make this system more robust, perhaps by wrapping all commits and rollbacks in a sub.

Bucardo.pm

index ca47258942c78d18ff8fc70586d4c6ad4207d71c..b7e450134d83126f13abda0ba2b64faa58ce9a8a 100644 (file)
@@ -5065,6 +5065,10 @@ sub start_kid {
                     }
                     $d->{async_active} = 0;
                 }
+
+                ## Mark triggers as enabled, since we are also rolling back our trigger disabling magic
+                $d->{triggers_enabled} = 1;
+
                 ## Seperate eval{} for the rollback as we are probably still connected to the transaction.
                 eval { $dbh->rollback; };
                 if ($@) {