Page MenuHomePhabricator

Rename tmp1 index on wb_terms databases to something more meaningful
Closed, DeclinedPublic

Description

The index only exists on WMF cluster, i.e. is not part of the schema defined along with the code.

The index was dropped as mentioned in T194270, but when it happened the severe outage happened related to database issues: T195520. As a quick measure, the index has been restored.

As the index is in the production database, it would be good to give it a more meaningful name, not "tmp1".

Name suggestion: term_search_unused.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 21 2018, 10:21 AM
Marostegui triaged this task as Normal priority.Jun 25 2018, 1:31 PM
Marostegui moved this task from Triage to Backlog on the DBA board.
Marostegui added a subscriber: Marostegui.

This index caused an outage, meaning it is being used. If it is being used, we should make sure it is added to the schema definition to make sure we have production and Wikibase.sql aligned.
Why do you choose term_search_unusued? The index is clearly being used :-)

I don't particular care much about the name but I think we should make sure code reflects the index. Once we are 100% sure it can be dropped, we can drop it again from code and production.

Vvjjkkii renamed this task from Rename tmp1 index on wb_terms databases to something more meaningful. to djaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii raised the priority of this task from Normal to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
Marostegui renamed this task from djaaaaaaaa to Rename tmp1 index on wb_terms databases to something more meaningful.Jul 1 2018, 8:00 PM
Marostegui lowered the priority of this task from High to Normal.
Marostegui updated the task description. (Show Details)
Marostegui added a subscriber: Aklapper.

@Ladsgroup what do you think about this task? Should we merge it with T85414?
I still think the best thing we can do for now is: T197854#4311753

I think this is a subtask of the main one. This would make sense.

Addshore changed the task status from Open to Stalled.Aug 18 2018, 5:20 PM
Addshore added a subscriber: Addshore.

Should we push forward with the rename or should we add it to our code base with the name "tmp1" for now?
If we want to push forward with the rename do we need a decision on the name?
Is the decision on the name & adding it to code the thing blocking moving forward with this ticket?

Addshore moved this task from Backlog to Questions on the wikidata-tech-focus board.
Addshore removed a project: Wikidata-Campsite.

Removing from the campsite for now until we know what this is blocked on.
Once we know how to move forward we can do the needed.

Should we push forward with the rename or should we add it to our code base with the name "tmp1" for now?

I would add it to code base for now. Add it as tmp1 for now to at least reflect what we have in production and then continue with T194273

If we want to push forward with the rename do we need a decision on the name?

We'd need a decision on the name + check if the index usage isn't hardcoded in any query FOCE INDEX (tmp1) + change it in our table codebase definition + an alter table that can take some weeks (given the size of the table).

Is the decision on the name & adding it to code the thing blocking moving forward with this ticket?

I think this ticket is somewhat a duplicate or related to T194273, if the idea is to eventually get rid of it I think we should only go for the change in wikibase.sql and avoid altering the table for weeks as it will be eventually dropped.
If we are not going to invest time on T194273 and want to keep tmp1 then we'd need to:

  1. close task T194273
  2. check if tmp1 index is harcoded somewhere in the code.
  3. decide an index name for tmp1
  4. change it on wikibase.sql to reflect the new index name
  5. alter wb_terms in production.

I have created T202265 to add the current index to our SQL files.
We will hold off on renaming for now, the plan is for this whole table to die, hopefully in the not to distant future, so spending weeks renaming seems like a waste.
I also marked T194273 as stalled based on the same fact that we should just prioritize getting rid of the table and usages.

So I'll mark this as declined for now...
If for some reason we decide to keep the table and want to clean up this name we can always re open this.

Addshore closed this task as Declined.Aug 20 2018, 9:43 AM

Sounds good to me!
Thanks @Addshore