HomePhabricator

Avoid MessageCache rebuilds if replace() was called recently

Authored by aaron.

Description

Avoid MessageCache rebuilds if replace() was called recently

  • If replace() was called recently, then we know that this is the master data center and that the messages are up-to-date. With this change, replace() calls have nothing to contend with aside from other replace() calls. Even if there were timeouts due to such contention, caused by high MediaWiki: page edit rates, the replace() updates would pick up the prior changes in passing since they do load().
  • This also avoids the following scenario: a) Someone edits a message page, triggering replace() b) Some page view causes load() to trigger loadFromDB() due to the hash being seen as volatile due to replace() c) The loadFromDB() loads stale slave data and undoes the message key update the replace() did

Change-Id: I9cdf7ad3d67f168fcba7f633af9e32a8d1fa928e

Details

Committed
aaronSep 3 2015, 1:06 AM
Parents
rMW89a167b500dc: More MessageCache locking/update cleanups
Branches
Unknown
Tags
Unknown
ChangeId
I9cdf7ad3d67f168fcba7f633af9e32a8d1fa928e