HomePhorge

rdbms: In LoadMonitor, use a loop of getWithSetCallback

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

rdbms: In LoadMonitor, use a loop of getWithSetCallback

LoadMonitor has a server cache (APCu) layer including locks for
stampede protection, in front of WANObjectCache with getMulti().
Apparently getMulti() was used instead of getWithSetCallback() to
reduce latency, but this seems poorly justified for such a
well-protected cache miss.

Simulation results showed that all server caches expire at once, and
there are as many simultaneous metric probes as there are MW hosts. The
randomness in isStateFresh() was not effective.

So, instead of getMulti(), use a loop of getWithSetCallback() with the
lockTSE option to avoid a stampede. Remove the random refresh from
isStateFresh().

Bug: T314020
Change-Id: Icd51680b557834d405a9d5297c1b189a0d1a44a8

Details

Provenance
Tim StarlingAuthored on Mar 21 2024, 5:26 AM
LadsgroupCommitted on Mar 22 2024, 10:20 AM

Event Timeline

Ladsgroup <Ladsgroup@gmail.com> committed rMW941843f14c38: rdbms: In LoadMonitor, use a loop of getWithSetCallback (authored by Tim Starling <tstarling@wikimedia.org>).Mar 22 2024, 10:20 AM

Commit No Longer Exists

This commit no longer exists in the repository.