From b4a4469c6e712f0129195870e917a61bc45d19b7 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Sat, 23 May 2015 12:22:03 -0400 Subject: [PATCH] When a kid does a rollback (e.g. serialization error), make sure we re-disable the triggers on each round. Long-term we need to make this system more robust, perhaps by wrapping all commits and rollbacks in a sub. --- Bucardo.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Bucardo.pm b/Bucardo.pm index ca4725894..b7e450134 100644 --- a/Bucardo.pm +++ b/Bucardo.pm @@ -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 ($@) { -- 2.39.5