From 77ea812c9e312bf977d98b9c82a424c6e9da7b1b Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 26 Jul 2014 12:37:56 -0700 Subject: [PATCH] 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 --- includes/jobqueue/JobQueueFederated.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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; -- 2.20.1