Page MenuHomePhabricator

Comment inexplicably not in DiscussionTools database
Open, Needs TriagePublic

Event Timeline

I checked a few other comments from that page and it looks like none of them are in the database.

This could happen if some exception occurred while processing the DiscussionTools deferred update that updates this database, here: https://gerrit.wikimedia.org/g/mediawiki/extensions/DiscussionTools/+/4666e9174595eabe7f3268d503e478b3b7ff3591/includes/Hooks/DataUpdatesHooks.php#46

I tried looking for debug logs from that day that would be relevant to that page: https://logstash.wikimedia.org/goto/ad65c5847aff1b289c00ff193a475d89 (searching by the page title, revid and pageid), finding nothing relevant.

I also tried looking for exceptions with "DiscussionTools" somewhere in the trace: https://logstash.wikimedia.org/goto/045297289107147c085cd26956fbeba1 and I found a bunch (some timeouts, some T323290), but the time frame isn't exactly right. I'm not sure if it's possible for the deferred update to be delayed by more than an hour after the edit happens?

Regardless, I tried finding which pages caused those exceptions (the exceptions don't mention which page or revision caused them, but I looked for other debug logs from the same requests, and some of them do: https://logstash.wikimedia.org/goto/bf83b02778626bdb5b1ea0322e4fb0ee). I traced 4 of the 5 requests to their relevant pages, and none of them have the same problem as "Talk:MediaWiki_UI".

So to summarize, I don't know why this happened. :)

Null-editing the page will re-trigger the DiscussionTools database update, and will probably fix the issue (or if it doesn't, it'll probably be easier to find relevant debug logs for the problem). I haven't done that yet in case anyone wants to investigate the current state of the page, but feel free to do it if this problem is delaying your Flow cleanup work.

I think I tried to null edit the page already before reporting this IIRC, and it didn't work.

Anyway, feel free. This isn't a major problem for me - it just punted one page linking to a topic there into the backlog of entries needing manual processing which was hundreds of items long already - it was so strange I had to report anyway.

I did a null edit with the WikimediaDebug browser extension with verbose logging enabled (https://logstash.wikimedia.org/goto/c39431ba2d2f4643517ec04613ace015), and I found that the data is actually being saved to the database.

So I viewed Special:FindComment with the same verbose logging (https://logstash.wikimedia.org/goto/72791802f45cc66c6fd606bbf4eeab07), and by replaying the queries it made on the replica databases, I found that it's not returning any results because DiscussionTools believes that the comments are only present in deleted pages (it hits this condition). The page is obviously not deleted now, but it has been deleted and restored a couple of times. There must be some error in the logic or in the data, but I don't know where yet, I might dig deeper next week.

Sigh

Why do I keep running into so many obscure corner cases like this?

You're trying to migrate data from an old system. No good deed goes unpunished ;)

I've also run into a bunch of cases where DiscussionTools thinks a comment is only in an old version and not the current version when that isn't the case. In every scenario a null edit has always helped, and importing hundreds of revisions at once put a lot of strain on the DiscussionTools parser and is known to be janky, so I don't think anything needs to be done.