Page MenuHomePhabricator

SpecialVersion calls same Memcached get() four times for CentralAuth
Closed, ResolvedPublic

Description

level=WARNING
channel=memcached
message=
Duplicate get(): "enwiki:specialversion-ext-version-text:/srv/mediawiki/php-1.31.0-wmf.17/extensions/CentralAuth/includes/../CentralAuth.php:d8c8c316b30f6ad6a9b18abd8792818ea78fbc7b" fetched 4 times

This might be related to CentralAuth registering 5 entries in the extension registry:

  • CentralAuth
  • GlobalRenameQueue
  • GlobalRenameRequest
  • Renameuser for CentralAuth
  • AntiSpoof for CentralAuth

Might be something we can avoid internally. Either by blindly process-caching (not preferred) or by deduplicating these entries internally for the purposes of SpecialVersion/GitInfo, so that when it goes about its batch to get this information, it only asks for it once and uses it four times. This is essentially process-caching, but within the application domain, instead of generically within WANObject/BagOStuff, and means that can be freed much sooner, as well.

Event Timeline

Still seen today, though interestingly when reproducing it, the entry shows up only for CentralAuth, not for other extensions. This suggests something more specific to that rather than something general in SpecialVersion - unless there's a version information "feature" that only CA utilizes, perhaps?

channel: memcached
WARNING
Duplicate get(): "nlwikinews:specialversion-ext-version-text:/srv/mediawiki/php-1.39.0-wmf.14/extensions/CentralAuth/includes/../extension.json:d160b616f3dc19833e3d0a70bedbe453219cab2f" fetched 4 times

I imagine CA is the only extension in production that dynamically adds values to $wgExtensionCredits on an extension function. I'm fine removing those and just having the main entry on Special:Version.

Change 829323 had a related patch set uploaded (by Zabe; author: Zabe):

[mediawiki/extensions/CentralAuth@master] Only add one credits entry for CentralAuth

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

Change 829323 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Hooks: Consolidate CentralAuth credits entries for subextensions

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

Krinkle claimed this task.
Krinkle reassigned this task from Krinkle to Zabe.