Merge "Validates wgArticlePath does start with slash (/)."
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 10 Nov 2015 23:21:19 +0000 (23:21 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 10 Nov 2015 23:21:19 +0000 (23:21 +0000)
includes/jobqueue/aggregator/JobQueueAggregatorRedis.php

index 6c49646..f8a0040 100644 (file)
@@ -59,7 +59,11 @@ class JobQueueAggregatorRedis extends JobQueueAggregator {
                        return false;
                }
                try {
-                       $conn->hDel( $this->getReadyQueueKey(), $this->encQueueName( $type, $wiki ) );
+                       // Make sure doNotifyQueueNonEmpty() takes precedence to avoid races
+                       $conn->watch( $this->getReadyQueueKey() );
+                       $conn->multi()
+                               ->hDel( $this->getReadyQueueKey(), $this->encQueueName( $type, $wiki ) )
+                               ->exec();
 
                        return true;
                } catch ( RedisException $e ) {