Make getScopedLockAndFlush() in Category::refreshCounts non-blocking
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 19 Apr 2018 18:43:09 +0000 (11:43 -0700)
committerKrinkle <krinklemail@gmail.com>
Mon, 23 Apr 2018 16:08:21 +0000 (16:08 +0000)
Change-Id: I675ec38e064f57a4e960b3934c472833a945b695
(cherry picked from commit 0b5ff6454a2ae32d88bf907dac9ee3937f59e0fd)

includes/Category.php

index 9241730..6104b8a 100644 (file)
@@ -328,7 +328,7 @@ class Category {
                $dbw = wfGetDB( DB_MASTER );
                # Avoid excess contention on the same category (T162121)
                $name = __METHOD__ . ':' . md5( $this->mName );
-               $scopedLock = $dbw->getScopedLockAndFlush( $name, __METHOD__, 1 );
+               $scopedLock = $dbw->getScopedLockAndFlush( $name, __METHOD__, 0 );
                if ( !$scopedLock ) {
                        return false;
                }