Anomie has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/358239 )
Change subject: ParserCache: Delete old-style key when saving ...................................................................... ParserCache: Delete old-style key when saving It was noticed that disk usage on the parser cache machines was increasing since shortly after wmf.4 was redeployed everywhere on the 9th. One theory is that I7fb9ffca9 causes this by making reparses for an existing old-style cache entry start writing the new-style key where they would previously have overwritten the old-style key. On that theory, let's delete that old-style key (that should now be useless) on save. I'm assuming here that firing a blind delete for keys that probably don't exist in the cache (i.e. every new edit) isn't going to hurt anything. If that's not the case, we'd need to check existence before deleting. Change-Id: Ie5efb05722cb7da2a90da195a1f244468177175d --- M includes/parser/ParserCache.php 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/39/358239/1 diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php index 9c6cf93..1f0e19e 100644 --- a/includes/parser/ParserCache.php +++ b/includes/parser/ParserCache.php @@ -327,6 +327,13 @@ // ...and its pointer $this->mMemc->set( $this->getOptionsKey( $page ), $optionsKey, $expire ); + // Normally, when there was no key change, the above would have + // overwritten the old entry. Delete that old entry to save disk + // space. + $oldParserOutputKey = $this->getParserOutputKey( $page, + $popts->optionsHashPre30( $optionsKey->mUsedOptions, $page->getTitle() ) ); + $this->mMemc->delete( $oldParserOutputKey ); + Hooks::run( 'ParserCacheSaveComplete', [ $this, $parserOutput, $page->getTitle(), $popts, $revId ] -- To view, visit https://gerrit.wikimedia.org/r/358239 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5efb05722cb7da2a90da195a1f244468177175d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie <bjor...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits