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
Open, LowPublic


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).

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.

Event Timeline

jcrespo created this task.May 3 2017, 3:20 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 3 2017, 3:20 PM
jcrespo updated the task description. (Show Details)May 3 2017, 3:34 PM

Very relevant: log_search was renamed from primary to ls_field_val some time ago:

Anomie added a subscriber: aaron.May 3 2017, 5:10 PM

Looks like the forcing was present when it was added in rSVN50567: [schema change] Use new log_search table to replace ugly code from r48839.. Maybe @aaron remembers why.

1978Gage2001 moved this task from Triage to In progress on the DBA board.Dec 11 2017, 9:45 AM
Marostegui moved this task from In progress to Triage on the DBA board.Dec 11 2017, 11:06 AM
jcrespo changed the task status from Open to Stalled.Aug 23 2018, 7:22 AM
aaron added a comment.Aug 23 2018, 7:36 AM

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

jcrespo triaged this task as Low priority.Oct 29 2018, 8:09 AM
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.