[Bucardo-general] problem with exception custom code.

Grant Maxwell grant.maxwell at maxan.com.au
Wed Aug 26 05:30:28 UTC 2009

Hi Folks

Im having trouble getting custom exception code to run. I have  
successfully created custom code and linked it to a sync for  
before_txn and it works fine, but
when i create some code and link it for "exception" to a goat (10) it  
seems ok but does not run and bucardo chucks a wobbly about the  

The code (for testing is very simple:

use Sys::Syslog;
use DBIx::Safe;
use strict;
use warnings;

my ($result) = @_;
if ($result->{dummy}){
    $result->{'action'} = 0;
    $result->{'message'} = "returning from code test";
} else {
$result->{'message'} = "ELS: Would change tower to $result- 
 >{'targetrow'}{pkmailid} for $result->{'targetrow'}{'emailaddress'}";
$result->{'action'} = 0;

below is the log fragment that shows bucardo acknowledging and testing  
the code but then ignoring it later.

any help appreciated


  MCP Activating sync "emailaddress_in_ms"
  MCP   Validating custom code 3 (exception) (goat=10):  
  MCP     OK: code contains a dummy string
  MCP   Validating source table "public.tblmailaddresslist" on t1
  MCP     Comparing tables and columns on messagestore
  MCP Listening on source server t1 for  
  MCP Skipping sync "emailaddress_out_t2": status is "inactive"
  MCP Entering main loop
  MCP Checking for existing controllers for sync "emailaddress_in_ms"
  CTL Controller starting for sync "emailaddress_in_ms". Source herd  
is "emailaddress_in"
  CTL   database: messagestore synctype:pushdelta stayalive:1  
  CTL   limitdbs:0 kicked:0 kidsalive:1 triggers: replica
  CTL Listening for "bucardo_ctl_kick_emailaddress_in_ms"
  CTL   Herd member 3218087: public.tblmailaddresslist
  CTL     Target oids: messagestore:16411
  MCP Created controller 15868 for sync "emailaddress_in_ms". Kick is 0
  CTL Cleaning out old q entry. sync='emailaddress_in_ms' pid=15195  
ppid=15150 targetdb=messagestore started:1 ended:0 aborted:1  
cdate=2009-08-26 14:53:39.603298+10
  CTL Cleaning out old q entry. sync='emailaddress_in_ms' pid=0  
ppid=15150 targetdb=messagestore started:0 ended:0 aborted:0  
cdate=2009-08-26 14:53:42.645999+10
  CTL Cleaning out old q entry. sync='emailaddress_in_ms' pid=15199  
ppid=15150 targetdb=messagestore started:1 ended:0 aborted:1  
cdate=2009-08-26 14:53:41.119064+10
  CTL Created new kid 15870 for sync "emailaddress_in_ms"
  KID New kid, syncs "t1" to "messagestore" for sync  
"emailaddress_in_ms" alive=1 Parent=15868
  KID Nothing to do: no entry found in the q table for this sync
  KID Got a notice for emailaddress_in_ms: t1 -> messagestore
  KID Source delta count for public.tblmailaddresslist: 5943
  KID Total delta count: 5943
  KID Rows to be upserted for public.tblmailaddresslist: 5943
  KID Updated public.tblmailaddresslist.emailaddress:
  KID Inserted  
.tblmailaddresslist.emailaddress: .. at host195.200-45-198.telecom.net.ar
  KID Inserted public.tblmailaddresslist.emailaddress: 0-6b at mail.majestytitle.com
  KID Inserted public.tblmailaddresslist.emailaddress: 0-6b at mattel.com
  KID Inserted public.tblmailaddresslist.emailaddress: 0-corvo at mail.khai.edu
  KID Inserted public.tblmailaddresslist.emailaddress: 0-darius at kdn.ktguide.com
  KID Warning! Rows set to aborted in the q table for this child: 1
  KID Warning! Child for "emailaddress_in_ms" was killed at line 3997:  
DBD::Pg::st execute failed: ERROR:  duplicate key value violates  
unique constraint "tblmailaddresslist_pkey" at /usr/local/share/perl/ 
5.10.0/Bucardo.pm line 3997.  main error: none source error: none  
target error: 7
  KID Sent an email to xxx: Bucardo kid for "emailaddress_in_ms"  
killed on theconsole
  CTL Warning! Kid 15870 seems to have died. Sync "emailaddress_in_ms"
  MCP Got notice "bucardo_kick_sync_emailaddress_in_ms" from 32761 on  
db t1
  MCP Sent a kick request to controller 15868 for sync  

> P please consider the environment before printing this e-mail
The information in this e-mail is confidential and may be legally  
privileged. It is intended solely for the addressee. Access to this e- 
mail by anyone else is unauthorised. If you have received this  
communication in error, please notify us immediately by return e-mail  
with the subject heading "Received in error" or telephone +61 2  
80050094, then delete the email and destroy any copies of it. If you  
are not the intended recipient, any disclosure, copying, distribution  
or any action taken or omitted to be taken in reliance on it, is  
prohibited and may be unlawful. Opinions, conclusions and other  
information in this e-mail and any attachments that do not relate to  
the business of the maXan are neither given nor endorsed by it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20090826/1e5cd965/attachment.html 

More information about the Bucardo-general mailing list