Page MenuHomePhabricator

Evaluate the need for FORCE INDEX (ls_field_val) [now IGNORE INDEX (ls_log_id)], delete the index hint if not needed anymore
Closed, ResolvedPublic

Description

Similarly to T162774, log_search access broke when on some servers ls_field_val was converted into a PRIMARY KEY. Mediawiki still defines the index as secondary. In order for the query to work, the FORCE INDEX (ls_field_val) was converted into IGNORE INDEX (ls_log_id). https://gerrit.wikimedia.org/r/351653

Maybe the hint is not needed anymore or maybe it has to be converted back into FORCE INDEX (PRIMARY). Evaluate its impact and see if the index hint is still needed, ans followup on changes on mediawiki.

Related incident: https://wikitech.wikimedia.org/wiki/Incident_documentation/2017-05-03_missing_index

Event Timeline

jcrespo changed the task status from Open to Stalled.Aug 23 2018, 7:22 AM

I don't recall. It's been long enough that it's worth testing how queries run without it.

jcrespo moved this task from Triage to Backlog on the DBA board.
Aklapper changed the task status from Stalled to Open.May 19 2020, 3:54 PM

The previous comments don't explain what/who exactly this task is stalled on ("If a report is waiting for further input (e.g. from its reporter or a third party) and can currently not be acted on"). Hence resetting task status to open. /includes/logging/LogPager.php still has the line $options['IGNORE INDEX'] = [ 'log_search' => 'ls_log_id' ];. If this is nothing to investigate anymore, feel free to set the task status to declined.

jcrespo moved this task from Triage to Backlog on the DBA board.

It was previously stalled waiting for Aaron, not anymore.

This is waiting on DBAs to check if it is needed, but has low priority.

This is a task that was brought up in an incident report. I applied the missing tag as such. For tasks that currently have no associated code owning team associated, I also added one or more teams that have the needed expertise to figure out what and how it should be mitigated, if it hasn't already. If tagged incorrectly, please pass on to a different team as needed, or escalate through management.

Are there any example queries I can use to check their query plan?.
Since this ticket was opened we've upgraded to two major versions so maybe the optimizer is now doing the right thing.

Marostegui claimed this task.

I am closing this per T164382#7391433 if we notice any slow query that can be related to this, please reopen.