Page MenuHomePhabricator

Wikimedia\Rdbms\DBQueryError: Error 1176: Key 'times' doesn't exist in table 'logging'
Closed, ResolvedPublic

Event Timeline

Nikerabbit triaged this task as Unbreak Now! priority.Dec 23 2020, 2:49 PM
Nikerabbit lowered the priority of this task from Unbreak Now! to High.Dec 23 2020, 3:10 PM
Nikerabbit moved this task from Backlog to Mitigated on the affects-translatewiki.net board.

Not sure why I cannot reproduce this on beta cluster (schema change not done there?).

Change 651817 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] Reflect name change of logging indexes in code

https://gerrit.wikimedia.org/r/651817

One note is that PG had a completely different index name, I wonder how it worked in PG.

Change 651817 merged by jenkins-bot:
[mediawiki/core@master] Reflect name change of logging indexes in code

https://gerrit.wikimedia.org/r/651817

Ladsgroup assigned this task to Ammarpad.

Change 652401 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] Better handling for Logging index that's being renamed

https://gerrit.wikimedia.org/r/652401

Change 652401 merged by jenkins-bot:
[mediawiki/core@master] Better handling for Logging index that's being renamed

https://gerrit.wikimedia.org/r/652401

In the past there was some index alias support - https://gerrit.wikimedia.org/r/c/mediawiki/core/+/411892/11/includes/db/MWLBFactory.php

But it seems unused and may not altered by config/DBAs

I am not sure if the performance or way of Database::indexExists is okay to have it per request, because it is normally not used outside of the updater and maintenance scripts

I am not sure if the performance or way of Database::indexExists is okay to have it per request, because it is normally not used outside of the updater and maintenance scripts

I have considered it but at the end decided to move forward because:

  • This is temporary and will be removed later
  • Checking existence of index is pretty cheap.
  • Both cases are rare cases, Special:Checkuser is being invoked quite irregularly (maybe once every minute or so) and query log is small, not to mention these tables are pretty small these days.

I am not sure if the performance or way of Database::indexExists is okay to have it per request, because it is normally not used outside of the updater and maintenance scripts

I have considered it but at the end decided to move forward because:

  • This is temporary and will be removed later
  • Checking existence of index is pretty cheap.
  • Both cases are rare cases, Special:Checkuser is being invoked quite irregularly (maybe once every minute or so) and query log is small, not to mention these tables are pretty small these days.

Does this still hold true with ae59076f2c420b444755e3ce7702a80a26df8da2 // T271259? That's a fair bit more widespread…

LogPager is slightly more used but not that much. If it's really going to cause an issue or not is not 100% known to me, I can measure it with deploying the change to mwdebug1001 and profile it but that's it.

I have created T271506. IDatabase::indexExists does indeed involve full query and I didn't know that we have better alternative that needs no query at all.