jenkins-bot has submitted this change and it was merged.

Change subject: Remove wfForeignMemcKey() usage from 
JobQueueRedis::getQueueKey()
......................................................................


Remove wfForeignMemcKey() usage from JobQueueRedis::getQueueKey()

This class should manage the escaping it uses, rather than use some
random BagOStuff that has nothing to do with the job queue.

Change-Id: Ie716dc4a3429754a99c5f0670555e5e049b61aa1
---
M includes/jobqueue/JobQueueRedis.php
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/jobqueue/JobQueueRedis.php 
b/includes/jobqueue/JobQueueRedis.php
index 3e7bdcc..67420f0 100644
--- a/includes/jobqueue/JobQueueRedis.php
+++ b/includes/jobqueue/JobQueueRedis.php
@@ -797,13 +797,17 @@
 
        /**
         * @param string $prop
-        * @param string|null $type
+        * @param string|null $type Override this for sibling queues
         * @return string
         */
        private function getQueueKey( $prop, $type = null ) {
                $type = is_string( $type ) ? $type : $this->type;
                list( $db, $prefix ) = wfSplitWikiID( $this->wiki );
+               $keyspace = $prefix ? "$db-$prefix" : $db;
 
-               return wfForeignMemcKey( $db, $prefix, 'jobqueue', $type, $prop 
);
+               $parts = array( $keyspace, 'jobqueue', $type, $prop );
+
+               // Parts are typically ASCII, but encode for sanity to escape 
":"
+               return implode( ':', array_map( 'rawurlencode', $parts ) );
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/258195
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie716dc4a3429754a99c5f0670555e5e049b61aa1
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to