From 8c104f86e7412861012176ee991550a3e5357979 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 4 Mar 2008 18:26:03 -0600 Subject: [PATCH] zebraqueue daemon - implement exiting if >100 postponed index updates Signed-off-by: Joshua Ferraro --- misc/bin/zebraqueue_daemon.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misc/bin/zebraqueue_daemon.pl b/misc/bin/zebraqueue_daemon.pl index ea788d5ff5..dd8f9f824d 100755 --- a/misc/bin/zebraqueue_daemon.pl +++ b/misc/bin/zebraqueue_daemon.pl @@ -334,6 +334,14 @@ sub postpone_update { $message .= "\n" unless $message =~ /\n$/; Unix::Syslog::syslog LOG_ERR, $message; $postponed_updates->{$server}->{$record_number} = 1; + + $num_postponed_updates++; + if ($num_postponed_updates > $max_postponed_updates) { + warn "exiting, over $max_postponed_updates postponed indexing updates"; + Unix::Syslog::syslog LOG_ERR, "exiting, over $max_postponed_updates postponed indexing updates"; + Unix::Syslog::closelog; + exit; + } } sub handler_stop { -- 2.39.5