Page MenuHomePhabricator

Key 'rev_user_timestamp' doesn't exist in table 'revision'
Closed, ResolvedPublicPRODUCTION ERROR

Description

FlaggedRevsHooks::recentContentEditCount and FlaggedRevsHooks::editSpacingCheck seem to be failing on edit, which could mean edits are being lost. Setting as unbreak unless confirmed it is a minor defect:

First occurence on 2018-05-30T22:01:35 and going up throughout the week, so almost definitely train-related.

{

  "_index": "logstash-2018.06.01",

  "_type": "mediawiki",

  "_id": "AWO6eTc8ZoLyKtr1VvDG",

  "_version": 1,

  "_score": null,

  "_source": {

    "server": "de.wikipedia.org",

    "db_server": "10.64.32.73",

    "wiki": "dewiki",

    "channel": "DBQuery",

    "type": "mediawiki",

    "error": "Key 'rev_user_timestamp' doesn't exist in table 'revision' (10.64.32.73)",

    "http_method": "POST",

    "@version": 1,

    "host": "mw1246",

    "shard": "s5",

    "sql1line": "SELECT  rev_timestamp  FROM `revision` FORCE INDEX (rev_user_timestamp)    WHERE rev_user = '203289'  ORDER BY rev_timestamp ASC LIMIT 1  ",

    "fname": "FlaggedRevsHooks::editSpacingCheck",

    "errno": 1176,

    "unique_id": "WxEEZwpAMFEAAJxD5bIAAABF",

    "method": "Wikimedia\\Rdbms\\Database::makeQueryException",

    "level": "ERROR",

    "ip": "10.64.0.104",

    "mwversion": "1.32.0-wmf.6",

    "message": "FlaggedRevsHooks::editSpacingCheck\t10.64.32.73\t1176\tKey 'rev_user_timestamp' doesn't exist in table 'revision' (10.64.32.73)\tSELECT  rev_timestamp  FROM `revision` FORCE INDEX (rev_user_timestamp)    WHERE rev_user = '203289'  ORDER BY rev_timestamp ASC LIMIT 1  ",

    "normalized_message": "{fname}\t{db_server}\t{errno}\t{error}\t{sql1line}",

    "url": "/w/index.php?title=Wikipedia:Administratoren/Anfragen&action=submit",

    "tags": [

      "syslog",

      "es",

      "es"

    ],

    "reqId": "WxEEZwpAMFEAAJxD5bIAAABF",

    "referrer": "https://de.wikipedia.org/w/index.php?title=Wikipedia:Administratoren/Anfragen&action=edit&section=12",

    "@timestamp": "2018-06-01T08:31:36.000Z",

    "db_name": "dewiki",

    "db_user": "wikiuser"

  },

  "fields": {

    "@timestamp": [

      1527841896000

    ]

  },

  "sort": [

    1527841896000

  ]

}

Event Timeline

jcrespo triaged this task as Unbreak Now! priority.Jun 1 2018, 8:40 AM

most likely a misspell of user_timestamp? However, FORCE should not be added lightly, at least without consultation.

I think it is a simple misspell at https://gerrit.wikimedia.org/r/#/c/418974/ (there could be others).

Tempted to remove the unbreak now, but I prefer someone on the know to check- for all I know, this could be preventing editing and if that is true, that would qualify as such. If you know it is a minor issue, please downgrade it.

I think it is a simple misspell at https://gerrit.wikimedia.org/r/#/c/418974/ (there could be others).

Looks like that as we have the indexes called:

rev_timestamp
user_timestamp

But not a combination of both (and I cannot find a task where it was asked to be removed)

Change 436798 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/extensions/FlaggedRevs@master] Fix bad index names

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

Change 436799 had a related patch set uploaded (by Reedy; owner: Anomie):
[mediawiki/extensions/FlaggedRevs@wmf/1.32.0-wmf.6] Fix bad index names

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

Change 436799 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@wmf/1.32.0-wmf.6] Fix bad index names

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

Change 436798 merged by jenkins-bot:
[mediawiki/extensions/FlaggedRevs@master] Fix bad index names

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

Mentioned in SAL (#wikimedia-operations) [2018-06-01T14:08:16Z] <reedy@tin> Synchronized php-1.32.0-wmf.6/extensions/FlaggedRevs: T196139 (duration: 01m 08s)

Reedy lowered the priority of this task from Unbreak Now! to High.Jun 1 2018, 2:23 PM
Reedy subscribed.

Do the DB error logs look happier now?

I think so:

Last error: 2018-06-01T14:07:08 https://logstash.wikimedia.org/goto/ab4e163180aebe0abae2ea55c63a9dd7

Do you know what was the actual impact, was it preventing actual user edits?

Do you know what was the actual impact, was it preventing actual user edits?

I don't think they've affected edits. A couple of the callers are for edit count checks. The others are for "counting implicitly reviewed edits", and "edit spacing requirements".

Thank you. Sorry if I gave it a higher priority that I should, I prefer to be safe in case I am wrong. Thank you very much for your quick help- this is resolved as far as I can tell.

Better to be safe than sorry!

Vvjjkkii renamed this task from Key 'rev_user_timestamp' doesn't exist in table 'revision' to 0ubaaaaaaa.Jul 1 2018, 1:07 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Anomie as the assignee of this task.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii edited subscribers, added: Anomie; removed: gerritbot, Aklapper.
Marostegui renamed this task from 0ubaaaaaaa to Key 'rev_user_timestamp' doesn't exist in table 'revision'.Jul 1 2018, 7:56 PM
Marostegui closed this task as Resolved.
Marostegui assigned this task to Anomie.
Marostegui lowered the priority of this task from High to Medium.
Marostegui updated the task description. (Show Details)
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:09 PM