Page MenuHomePhabricator

Improve "lag mitigation" TTL logic in WANObjectCache
Closed, ResolvedPublic

Description

The lag-mitigation TTL logic in set() could be made smarter by:

  • Checking $walltime in a better way to distinguish high/low regeneration times. Right now, I see "0.005120992660522461" being reported as "high" for 4vN48nkBmhjHfZRTRKyF (could just be someone manually debugging on mwdebug though)
  • Ussing something higher than LOW_TTL (30 seconds) for the "slow callback case without lockTSE" case
  • Possibly scheduling async regenerations and making the asyncHandler flush replica snapshots (also nice for avoiding similar problems with preemptive refresh updates since they run at the end of the request)
  • Possibly making purge tombstones last longer (assuming the current automatic lockTSE and interim key logic is sufficient) so that MAX_READ_LAG could be higher

See T282985: Show cached information on NewcomerTasksInfo special page.

Event Timeline

Change 700115 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/core@master] objectcache: improve the WANObjectCache "lag mitigation" TTL logic

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

Change 700258 had a related patch set uploaded (by Aaron Schulz; author: Aaron Schulz):

[mediawiki/core@master] rdbms: add "fetched" field to Database::setCacheOptions

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

Change 700115 merged by jenkins-bot:

[mediawiki/core@master] objectcache: improve the WANObjectCache \"lag mitigation\" TTL logic

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

Krinkle triaged this task as Medium priority.Sep 20 2021, 6:20 PM