Gergő Tisza has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/197684

Change subject: Force LocalFile::purgeMetadataCache use the master DB
......................................................................

Force LocalFile::purgeMetadataCache use the master DB

This used to happen automatically via markVolatile() but that was
removed in I808c3a6, which caused cache updates after move/delete
to retain outdated information from slaves.

Bug: T93009
Bug: T88506
Change-Id: Ie4a6c5fbecec9b38ad3ff45fbc22c5d74d66601c
---
M includes/filerepo/file/LocalFile.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/84/197684/1

diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index be5ca7f..b4cced3 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -842,7 +842,7 @@
         * Refresh metadata in memcached, but don't touch thumbnails or squid
         */
        function purgeMetadataCache() {
-               $this->loadFromDB();
+               $this->loadFromDB( File::READ_LATEST );
                $this->saveToCache();
                $this->purgeHistory();
        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4a6c5fbecec9b38ad3ff45fbc22c5d74d66601c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: GergÅ‘ Tisza <[email protected]>

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

Reply via email to