diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2014-12-27 15:41:37 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2014-12-31 11:43:28 +0100 |
commit | c1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch) | |
tree | 2b38796e738dd74cb42ecd9bfd151803108386bc /includes/db/ChronologyProtector.php | |
parent | b88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff) |
Update to MediaWiki 1.24.1
Diffstat (limited to 'includes/db/ChronologyProtector.php')
-rw-r--r-- | includes/db/ChronologyProtector.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/includes/db/ChronologyProtector.php b/includes/db/ChronologyProtector.php index de5e72c3..0c7b612e 100644 --- a/includes/db/ChronologyProtector.php +++ b/includes/db/ChronologyProtector.php @@ -26,12 +26,14 @@ * Kind of like Hawking's [[Chronology Protection Agency]]. */ class ChronologyProtector { - /** @var Array (DB master name => position) */ + /** @var array (DB master name => position) */ protected $startupPositions = array(); - /** @var Array (DB master name => position) */ + + /** @var array (DB master name => position) */ protected $shutdownPositions = array(); - protected $initialized = false; // bool; whether the session data was loaded + /** @var bool Whether the session data was loaded */ + protected $initialized = false; /** * Initialise a LoadBalancer to give it appropriate chronology protection. @@ -41,7 +43,7 @@ class ChronologyProtector { * to that position by delaying execution. The delay may timeout and allow stale * data if no non-lagged slaves are available. * - * @param $lb LoadBalancer + * @param LoadBalancer $lb * @return void */ public function initLB( LoadBalancer $lb ) { @@ -67,7 +69,7 @@ class ChronologyProtector { * Notify the ChronologyProtector that the LoadBalancer is about to shut * down. Saves replication positions. * - * @param $lb LoadBalancer + * @param LoadBalancer $lb * @return void */ public function shutdownLB( LoadBalancer $lb ) { @@ -83,6 +85,7 @@ class ChronologyProtector { $info = $lb->parentInfo(); if ( !$db || !$db->doneWrites() ) { wfDebug( __METHOD__ . ": LB {$info['id']}, no writes done\n" ); + return; } $pos = $db->getMasterPos(); |