From: Aaron Schulz Date: Sat, 26 Jul 2014 19:37:56 +0000 (-0700) Subject: Removed use of cache in JobQueueFederated pop() method X-Git-Tag: 1.31.0-rc.0~14721 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=77ea812c9e312bf977d98b9c82a424c6e9da7b1b;p=lhc%2Fweb%2Fwiklou.git Removed use of cache in JobQueueFederated pop() method * This does not really buy anything for a number of reason and can cause bugs. For example, if the aggregator is notified due to undelayed jobs but this cache is not updated, then the runners will not see the jobs and will de-list aggregator entry. bug: 68506 Change-Id: I1eacca108df59fff9c0fcc846aafaf1616cf5895 --- diff --git a/includes/jobqueue/JobQueueFederated.php b/includes/jobqueue/JobQueueFederated.php index 01d7ec45ac..fce30fb52e 100644 --- a/includes/jobqueue/JobQueueFederated.php +++ b/includes/jobqueue/JobQueueFederated.php @@ -316,13 +316,6 @@ class JobQueueFederated extends JobQueue { } protected function doPop() { - $key = $this->getCacheKey( 'empty' ); - - $isEmpty = $this->cache->get( $key ); - if ( $isEmpty === 'true' ) { - return false; - } - $partitionsTry = $this->partitionRing->getLiveLocationWeights(); // (partition => weight) $failed = 0; @@ -351,6 +344,7 @@ class JobQueueFederated extends JobQueue { } $this->throwErrorIfAllPartitionsDown( $failed ); + $key = $this->getCacheKey( 'empty' ); $this->cache->set( $key, 'true', JobQueueDB::CACHE_TTL_LONG ); return false;