Manybubbles has uploaded a new change for review.
https://gerrit.wikimedia.org/r/197532
Change subject: Don't try to use the pool counter without a user
......................................................................
Don't try to use the pool counter without a user
We never want to even try because not having a users means we're running in a
batch context.
Change-Id: I616b8ca926f8d40bf4079af28f643b3d43ade6ee
---
M includes/Util.php
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch
refs/changes/32/197532/1
diff --git a/includes/Util.php b/includes/Util.php
index c9c9c40..6c6fed4 100644
--- a/includes/Util.php
+++ b/includes/Util.php
@@ -103,6 +103,11 @@
// By default the pool counter allows you to lock the same key
with
// multiple types. That might be useful but it isn't how
Cirrus thinks.
// Instead, all keys are scoped to their type.
+
+ if ( !$user ) {
+ // We don't want to even use the pool counter if there
isn't a user.
+ return $workCallback();
+ }
$perUserKey = md5( $user->getName() );
$perUserKey = "nowait:CirrusSearch:_per_user:$perUserKey";
$globalKey = "$type:$wgCirrusSearchPoolCounterKey";
--
To view, visit https://gerrit.wikimedia.org/r/197532
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I616b8ca926f8d40bf4079af28f643b3d43ade6ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits