From fc30f03dd3c8bb2d1278b59cf27213c6af64bed0 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 27 May 2014 11:21:07 -0700 Subject: [PATCH] Reduce Title::invalidateCache contention a bit * Lots of deadlocks seems to happen on page deletion, where the ID is likely 0 (this also has the worst locks) bug: 37519 Change-Id: I028783a998946615b93e1425c6f69e00afd7b1bb --- includes/Title.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/Title.php b/includes/Title.php index ea4a1b2fb6..d8f6b75112 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4728,6 +4728,10 @@ class Title { return false; } + if ( $this->mArticleID === 0 ) { + return true; // avoid gap locking if we know it's not there + } + $method = __METHOD__; $dbw = wfGetDB( DB_MASTER ); $conds = $this->pageCond(); -- 2.20.1