[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. c208c4c555063f40f21d64caa1bbe0fc9c1cbf79

Evergreen Git git at git.evergreen-ils.org
Thu Jan 10 08:02:03 EST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_2 has been updated
       via  c208c4c555063f40f21d64caa1bbe0fc9c1cbf79 (commit)
      from  c1054b299e19f2101996cb707f8408379beb1472 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c208c4c555063f40f21d64caa1bbe0fc9c1cbf79
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Wed Jan 9 16:20:39 2013 -0500

    LP #1075167: Serials: Avoid infinite loop in holdings summarization
    
    When receiving items with unworkable combinations of holdings and
    patterns, the holdings summarization code can get stuck in an infinite
    loop.  This solution prevents that, sparing the open-ils.serial
    process and server resources, although it doesn't help the user out.
    
    It will take further examination of the problem and reëvalution of how
    we deal with problems reported by OpenILS::Utils::MFHD to help the
    user avoid or resolve these situations.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD.pm
index 309f9fe..2bf94d4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD.pm
@@ -405,6 +405,9 @@ sub get_compressed_holdings {
         } else {
             push(@comp_holdings, $curr_holding);
             while ($runner le $holding) {
+                # Here is where we used to get stuck in an infinite loop
+                # until the "Don't know how to deal with frequency" was
+                # elevated from a carp to a croak.
                 $runner->increment;
             }
             $curr_holding = $holding->clone;
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm
index 297d0ab..bec2677 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm
@@ -475,7 +475,7 @@ sub next_chron {
         if (!defined($freq)) {
             carp "Undefined frequency in next_chron!";
         } elsif (!MFHD::Date::can_increment($freq)) {
-            carp "Don't know how to deal with frequency '$freq'!";
+            croak "Don't know how to deal with frequency '$freq'!";
         } else {
             # One of the standard defined issue frequencies
             @new = MFHD::Date::incr_date($freq, @cur);

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD.pm    |    3 +++
 .../src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list