From c96906a87ac98acf7d815ed624f3cdd6ee3fcd14 Mon Sep 17 00:00:00 2001 From: Christian Aistleitner Date: Mon, 23 Apr 2012 16:58:25 +0200 Subject: [PATCH] No environment reset for failure after prefetch hit Change-Id: I2377369c2f8c5a37db24ebf437a5ee7dd31d7bf6 --- maintenance/backupTextPass.inc | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/maintenance/backupTextPass.inc b/maintenance/backupTextPass.inc index acf4a10e1a..11f0cd5073 100644 --- a/maintenance/backupTextPass.inc +++ b/maintenance/backupTextPass.inc @@ -487,20 +487,22 @@ class TextPassDumper extends BackupDumper { // Something went wrong; we did not a text that was plausible :( $failures++; - - // After backing off for some time, we try to reboot the whole process as - // much as possible to not carry over failures from one part to the other - // parts - sleep( $this->failureTimeout ); - try { - $this->rotateDb(); - if ( $this->spawn ) { - $this->closeSpawn(); - $this->openSpawn(); + // A failure in a prefetch hit does not warrant resetting db connection etc. + if ( ! $tryIsPrefetch ) { + // After backing off for some time, we try to reboot the whole process as + // much as possible to not carry over failures from one part to the other + // parts + sleep( $this->failureTimeout ); + try { + $this->rotateDb(); + if ( $this->spawn ) { + $this->closeSpawn(); + $this->openSpawn(); + } + } catch ( Exception $e ) { + $this->progress( "Rebooting getText infrastructure failed (" . $e->getMessage() . ")" . + " Trying to continue anyways" ); } - } catch ( Exception $e ) { - $this->progress( "Rebooting getText infrastructure failed (" . $e->getMessage() . ")" . - " Trying to continue anyways" ); } } -- 2.20.1