From 9fb67b9a41da8714743789fa0365a6052cc86b97 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 11 Oct 2018 14:51:36 -0700 Subject: [PATCH] Make merged MergeableUpdate items always go to the end of the queue Change-Id: I2e8aa28f7426470d9b8b9e11b902deea793069b3 --- includes/deferred/DeferredUpdates.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index e6a0e81779..47c9f6f2f3 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -146,6 +146,10 @@ class DeferredUpdates { /** @var MergeableUpdate $existingUpdate */ $existingUpdate = $queue[$class]; $existingUpdate->merge( $update ); + // Move the update to the end to handle things like mergeable purge + // updates that might depend on the prior updates in the queue running + unset( $queue[$class] ); + $queue[$class] = $existingUpdate; } else { $queue[$class] = $update; } -- 2.20.1