From 91733632d72c26a1d6f6c7a6ab942534fc2ac3fc Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 22 Oct 2014 10:32:48 -0700 Subject: [PATCH] Fixed loop in wfWaitForSlaves() * The "break" statements should obviously be "continue" here. Change-Id: Ia4a9bad77a9f512153aee6b77443104e71f5cd56 --- includes/GlobalFunctions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index ad20c6fea6..4eea662420 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3776,7 +3776,7 @@ function wfGetNull() { * does this check, it makes since to use $ifWritesSince, particularly if * cluster is "*", to avoid excess overhead. * - * Never call this method after a big DB write that is still in a transaction. + * Never call this function after a big DB write that is still in a transaction. * This only makes sense after the possible lag inducing changes were committed. * * @param float|null $ifWritesSince Only wait if writes were done since this UNIX timestamp @@ -3813,11 +3813,11 @@ function wfWaitForSlaves( // Prevents permission error when getting master position if ( $lb->getServerCount() > 1 ) { if ( $ifWritesSince && !$lb->hasMasterConnection() ) { - break; // assume no writes done + continue; // assume no writes done } $dbw = $lb->getConnection( DB_MASTER, array(), $wiki ); if ( $ifWritesSince && $dbw->lastDoneWrites() < $ifWritesSince ) { - break; // no writes since the last wait + continue; // no writes since the last wait } $pos = $dbw->getMasterPos(); // The DBMS may not support getMasterPos() or the whole -- 2.20.1