As suggested in T164505#3237739 and following comments, Echo should use a purge-on-write, cache-from-slave WANCache approach to caching, rather than its current recache-on-write strategy. This is probably necessary to make Echo work in a multi-DC environment, and will also address T164505: Read queries detected on the x1 master by Echo extension more fully.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | aaron | T88445 MediaWiki active/active datacenter investigation and work (tracking) | |||
Resolved | • Catrope | T164860 Update Echo's caching strategy for multi-dc compatibility |
Event Timeline
@aaron Do I understand correctly that Echo's current strategy, which is to overwrite (as opposed to purge) entries in WANObjectCache, needs to be fixed for multi-DC?
Potentially related: T138341: Consider replacing echo_unread_wikis table with a cache
Change 436204 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/Echo@master] CachedList: Use getWithSetCallback()
Change 436205 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/Echo@master] NotifUser: Redo caching strategy for multi-DC compatibility
Change 436204 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] CachedList: Use getWithSetCallback()
These patches fix most of the issue, but there's still one left: flagCacheWithNewTalkNotification() and flagCacheWithNoTalkNotification() still call WANObjectCache::set(). It's a lot harder to figure out what that cache key actually means (and what the set callback for this key would look like), so I'm going to come back to this a little later.
Change 436697 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/Echo@master] NotifUser: Remove basically-unused talk notification cache
Change 436205 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] NotifUser: Redo caching strategy for multi-DC compatibility
Change 441377 had a related patch set uploaded (by Aaron Schulz; owner: Aaron Schulz):
[mediawiki/extensions/Echo@master] [WIP] Make "echo-new-talk-notification" key use getWithSetCallback()
Change 441377 abandoned by Aaron Schulz:
[WIP] Make "echo-new-talk-notification" key use getWithSetCallback()
Change 436697 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] NotifUser: Remove basically-unused talk notification cache