Revert "MessageCache: Avoid 'contributions' replicas"

The 'contributions' group no longer exists, no need to avoid it.

This reverts commit 6efee6f0db.

Bug: T314493
Change-Id: I548077fa3122e9bd5b6cbec990a3dcabffe1659e
This commit is contained in:
Lucas Werkmeister 2022-08-03 17:14:09 +02:00
parent e3bfa9b796
commit da301247f9

View file

@ -515,11 +515,7 @@ class MessageCache implements LoggerAwareInterface {
* @return array Loaded messages for storing in caches
*/
private function loadFromDB( $code, $mode = null ) {
// (T164666) The query here performs really poorly on WMF's
// contributions replicas. We don't have a way to say "any group except
// contributions", so for the moment let's specify 'api'.
// @todo: Get rid of this hack.
$dbr = wfGetDB( ( $mode === self::FOR_UPDATE ) ? DB_PRIMARY : DB_REPLICA, 'api' );
$dbr = wfGetDB( ( $mode === self::FOR_UPDATE ) ? DB_PRIMARY : DB_REPLICA );
$cache = [];