[open-ils-commits] r16625 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Search (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jun 8 12:14:34 EDT 2010
Author: erickson
Date: 2010-06-08 12:14:31 -0400 (Tue, 08 Jun 2010)
New Revision: 16625
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
protect against empty results from bib searches caused by
search timeouts. This allows the API call to log the error
and return reasonable results
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2010-06-08 15:26:24 UTC (rev 16624)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm 2010-06-08 16:14:31 UTC (rev 16625)
@@ -1153,7 +1153,7 @@
$results = $U->storagereq($method, %$search_hash);
$search_duration = time - $start;
$logger->info("staged search: DB call took $search_duration seconds and returned ".scalar(@$results)." rows, including summary");
- $summary = shift(@$results);
+ $summary = shift(@$results) if $results;
unless($summary) {
$logger->info("search timed out: duration=$search_duration: params=".
More information about the open-ils-commits
mailing list