Page MenuHomePhabricator

DBPerformance warning "Query returned 22186 rows: query: SELECT * FROM `translate_metadata`" on Meta-Wiki
Open, MediumPublicPRODUCTION ERROR

Description

Translate extensions uses super simple in-process caching on translate_metadata. Every time a caller wants to read something from that table, the code loads and caches the whole table into process memory. The good side of this is, when the table is small, that it will only cause one extra query instead of a lot of them. This way they callers do not need to care or do preloading.

However, on Meta the table has grown to 22k entries, and MediaWiki has started to warn about big reads from the database. Fixing this properly requires checking all callers and add suitable preloading to those who need it.

Aside, for testing and other purposes, this class shouldn't be static, but a service.

Event Timeline

Krinkle renamed this task from Query returned 22222 row(s): query: SELECT * FROM `translate_metadata` on Metawiki to DBPerformance warning "Query returned 22186 rows: query: SELECT * FROM `translate_metadata`" on Meta-Wiki.Sep 11 2018, 5:37 PM
Krinkle edited projects, added Wikimedia-production-error; removed Technical-Debt.
jijiki triaged this task as Medium priority.Oct 26 2018, 10:19 AM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:09 PM
LSobanski added a subscriber: LSobanski.

Removing the DBA tag and subscribing myself instead. If there are any specific actions for DBA please re-add us or @mention me.