Page MenuHomePhabricator

Use WAN cache instead of local cluster cache in GrowthExperiments
Closed, ResolvedPublic

Description

@Ladsgroup said in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/748827/7#message-1bdd570f88402cd35eec06bb64cf04b740ab558c:

The cache for MentorPageMentorManager is ObjectCache::getLocalClusterInstance. LocalCluster cache is a terrible and niche cache that is being deprecated.

I reviewed cache uses in areas of GrowthExperiments I'm responsible for, and I do not see any benefits of using a local cluster cache. Let move to the WAN cache, which seems to be a better fit for what we're doing.

Classes to fix
  • MentorStore
  • DatabaseMenteeOverviewDataProvider
  • WikiPageConfigLoader
  • AqsEditInfoService

Event Timeline

Urbanecm_WMF triaged this task as Low priority.

I'll upload patches for areas of code I maintain.

Change 749920 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] DatabaseMenteeOverviewDataProvider: Use WAN cache instead of local cluster cache

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

Change 749920 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] DatabaseMenteeOverviewDataProvider: Use WAN cache instead of local cluster cache

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

More specifically, cluster-local caches which rely on invalidation won't work correctly once Wikimedia switches to multi-DC (as the WAN cache sends invalidation accross DCs and the cluster-local cache doesn't). For caches which don't need invalidation, I think the behavior is identical (they use the same memcached servers) other than WAN cache having a different PHP handler offering slightly different functionality (and not implementing BagOStuff, which is one of the more annoying design choices around MediaWiki caching IMO).

kostajh subscribed.

I think we're done with this task? @Urbanecm_WMF if so please close it out.

@kostajh We still use the local cluster cache in a bunch of places:

  • AqsEditInfoService
  • DatabaseMentorStore
  • WikiPageConfigLoader

Moving to In progress.

Change 751505 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] MentorStore: Stop using local cluster cache

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

Change 751505 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] MentorStore: Stop using local cluster cache

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

Urbanecm_WMF changed the task status from Open to In Progress.Jan 31 2022, 11:33 AM

@kostajh We still use the local cluster cache in a bunch of places:

  • AqsEditInfoService
  • DatabaseMentorStore
  • WikiPageConfigLoader

Moving to In progress.

Hi @Urbanecm_WMF, is this one still in progress?

Change 778196 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] AqsEditInfoService: Do not use local cluster cache

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

@kostajh We still use the local cluster cache in a bunch of places:

  • AqsEditInfoService
  • DatabaseMentorStore
  • WikiPageConfigLoader

Moving to In progress.

Hi @Urbanecm_WMF, is this one still in progress?

Yes, sorry, I thought I uploaded some patches for following up. Turns out I did not :). Thanks for the reminder. Done.

Change 778196 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] AqsEditInfoService: Do not use local cluster cache

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

@Urbanecm_WMF is WikiPageConfigLoader the last one that needs to be done?

@Urbanecm_WMF , tagging you again in case you missed the last comment from Kosta.

@Urbanecm_WMF , tagging you again in case you missed the last comment from Kosta.

Thanks @MShilova_WMF!

@Urbanecm_WMF is WikiPageConfigLoader the last one that needs to be done?

I think so!

Change 829297 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] WikiPageConfigLoader: Stop using local cluster cache

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

Change 829297 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] WikiPageConfigLoader: Stop using local cluster cache

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