From 6511af9965a2cbefe4a84f8ddbfe879e91c90187 Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 18 Jul 2005 13:49:03 +0000 Subject: [PATCH] adding some debuging that seems to magically fix the problem git-svn-id: svn://svn.open-ils.org/ILS/trunk@1253 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Storage/WORM.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/WORM.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/WORM.pm index ddd84d5c17..00e0318c54 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/WORM.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/WORM.pm @@ -277,6 +277,7 @@ sub wormize { my ($outer_xact) = $in_xact->run; try { unless ($outer_xact) { + $log->debug("WoRM isn't inside a transaction, starting one now.", INFO); my ($r) = $begin->run($client); unless (defined $r and $r) { $rollback->run; @@ -309,9 +310,12 @@ sub wormize { $entry->fingerprint( fingerprint_mods( $mods ) ); push @entry_list, $entry; + $log->debug("Fingerprint for Record Entry ".$docid." is [".$entry->fingerprint."]", INFO); + unless ($no_map) { my ($mr) = $mr_lookup->run( $entry->fingerprint ); if (!@$mr) { + $log->debug("No metarecord found for fingerprint [".$entry->fingerprint."]; Creating a new one", INFO); $mr = new Fieldmapper::metabib::metarecord; $mr->fingerprint( $entry->fingerprint ); $mr->master_record( $entry->id ); @@ -321,7 +325,7 @@ sub wormize { throw OpenSRF::EX::PANIC ("Couldn't run open-ils.storage.direct.metabib.metarecord.create!") } } else { - $mr = $$mr[0]; + $log->debug("Retrieved metarecord, id is ".$mr->id, INFO); $mr->mods(''); push @mr_list, $mr; } @@ -417,6 +421,7 @@ sub wormize { } unless ($outer_xact) { + $log->debug("Commiting transaction started by the WoRM.", INFO); my ($c) = $commit->run; unless (defined $c and $c) { $rollback->run; -- 2.11.0