Page MenuHomePhabricator

Undeleted Wikidata items do not reappear in WDQS
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

Initially reported at https://www.wikidata.org/w/index.php?title=Wikidata:Report_a_technical_problem/WDQS_and_Search&oldid=1932278737#Undeleted_items_missing_from_WDQS with no response.

Steps to replicate the issue
I don't know how reproducible this issue is, but the steps were:

  • Delete an item
  • Undelete the item
  • Wait
  • Search for the item in WDQS

What happens?:

There is no trace of the undeleted items in WDQS. Some time after editing one of the items, it does show up, but unedited items apparently never show up.

What should have happened instead?:

Undeleted items should reappear in WDQS.

Example SPARQL:

SELECT ?x ?p ?y {
  VALUES ?x { wd:Q107642255 wd:Q115944718 wd:Q107456854 wd:Q107568498 }
  ?x ?p ?y .
}

See also https://www.wikidata.org/wiki/Wikidata:Report_a_technical_problem/WDQS_and_Search/Archive/2023#Coolidge_Auditorium_(Q115608572)_strange_behavior_in_query phab:T329064, phab:T329089 where it appears that a very similar problem has appeared in the past but has been reported fixed.

Event Timeline

Recording few technical informations while we still have them.
The undelete events appear to have been sent by MediaWiki but they don't appear to have the revision_id in them:
Topic eqiad.mediawiki.page-undelete:

{"$schema":"/mediawiki/page/undelete/1.0.0","meta":{"uri":"https://www.wikidata.org/wiki/Q107456854","request_id":"bb64eb9b-088b-4a36-b455-dd1568be2570","id":"258a8402-e51c-4571-969c-97e649ab0d0e","dt":"2023-07-07T19:20:14Z","domain":"www.wikidata.org","stream":"mediawiki.page-undelete"},"database":"wikidatawiki","performer":{"user_text":"Bovlb","user_groups":["sysop","*","user","autoconfirmed"],"user_is_bot":false,"user_id":61692,"user_registration_dt":"2012-12-16T06:06:38Z","user_edit_count":73529},"page_id":102748096,"page_title":"Q107456854","page_namespace":0,"page_is_redirect":false,"rev_id":0,"comment":"[[Topic:Xlgm8w1iwgloz991]]","parsedcomment":"<a href=\"/wiki/Topic:Xlgm8w1iwgloz991\" title=\"Topic:Xlgm8w1iwgloz991\">Topic:Xlgm8w1iwgloz991</a>"}
{"$schema":"/mediawiki/page/undelete/1.0.0","meta":{"uri":"https://www.wikidata.org/wiki/Q107642255","request_id":"1e0c0dae-494f-4b18-b142-17cac2638a54","id":"ef63f4e5-7e95-4f66-9d37-8ba5a548d09e","dt":"2023-07-07T20:13:04Z","domain":"www.wikidata.org","stream":"mediawiki.page-undelete"},"database":"wikidatawiki","performer":{"user_text":"Bovlb","user_groups":["sysop","*","user","autoconfirmed"],"user_is_bot":false,"user_id":61692,"user_registration_dt":"2012-12-16T06:06:38Z","user_edit_count":73535},"page_id":102927241,"page_title":"Q107642255","page_namespace":0,"page_is_redirect":false,"rev_id":0,"comment":"[[Topic:Xlgp8hfe9sahuwt6]]","parsedcomment":"<a href=\"/wiki/Topic:Xlgp8hfe9sahuwt6\" title=\"Topic:Xlgp8hfe9sahuwt6\">Topic:Xlgp8hfe9sahuwt6</a>"}
{"$schema":"/mediawiki/page/undelete/1.0.0","meta":{"uri":"https://www.wikidata.org/wiki/Q115944718","request_id":"5e85ef6a-5e7b-4455-bc0a-22b4c3e442bd","id":"447ebe40-e73e-42ab-8086-94923aec9cf0","dt":"2023-07-07T20:13:18Z","domain":"www.wikidata.org","stream":"mediawiki.page-undelete"},"database":"wikidatawiki","performer":{"user_text":"Bovlb","user_groups":["sysop","*","user","autoconfirmed"],"user_is_bot":false,"user_id":61692,"user_registration_dt":"2012-12-16T06:06:38Z","user_edit_count":73535},"page_id":110631094,"page_title":"Q115944718","page_namespace":0,"page_is_redirect":false,"rev_id":0,"comment":"[[Q115944718]]","parsedcomment":"<a href=\"/wiki/Q115944718\" class=\"new\" title=\"Q115944718 (page does not exist)\">Q115944718</a>"}
{"$schema":"/mediawiki/page/undelete/1.0.0","meta":{"uri":"https://www.wikidata.org/wiki/Q107568498","request_id":"8805c7d8-1881-403b-99cd-4c3b41e81183","id":"1c6cd889-bf2f-44fa-a9d6-bea7d795a6f5","dt":"2023-07-07T20:14:15Z","domain":"www.wikidata.org","stream":"mediawiki.page-undelete"},"database":"wikidatawiki","performer":{"user_text":"Bovlb","user_groups":["sysop","*","user","autoconfirmed"],"user_is_bot":false,"user_id":61692,"user_registration_dt":"2012-12-16T06:06:38Z","user_edit_count":73535},"page_id":102855768,"page_title":"Q107568498","page_namespace":0,"page_is_redirect":false,"rev_id":0,"comment":"[[Topic:Xlgp8hfe9sahuwt6]]","parsedcomment":"<a href=\"/wiki/Topic:Xlgp8hfe9sahuwt6\" title=\"Topic:Xlgp8hfe9sahuwt6\">Topic:Xlgp8hfe9sahuwt6</a>"}

Note the rev_id field being 0 in all events, this probably told the updater to ignore such events.
There are possibly two fixes to make here:

  • try to emit the proper rev_id from mediawiki
  • The reconciliation procedure for inconsistencies should not take for granted the revision of the source events and call MW to infer the latest revision if possible

Here are the problems identified by the updater for these undeletes:
Topic codfw.rdf-streaming-updater.state-inconsistency:

{"meta":{"domain":"www.wikidata.org","id":"1188fefb-95b0-422b-8bd2-2140157ead22","dt":"2023-07-07T19:22:16.944473Z","stream":"rdf-streaming-updater.state-inconsistency"},"item":"Q107456854","original_ingestion_dt":"2023-07-07T19:20:17.957Z","revision_id":0,"original_event_info":{"dt":"2023-07-07T19:20:14Z","$schema":"/mediawiki/page/undelete/1.0.0","meta":{"id":"258a8402-e51c-4571-969c-97e649ab0d0e","dt":"2023-07-07T19:20:14Z","stream":"mediawiki.page-undelete","request_id":"bb64eb9b-088b-4a36-b455-dd1568be2570","domain":"www.wikidata.org"}},"action_type":"page-undelete","inconsistency":"unmatched_delete","state_revision_id":1903563044,"state_status":"DELETED","dt":"2023-07-07T19:22:16.782704Z","$schema":"/rdf_streaming_updater/state_inconsistency/1.0.0"}
{"meta":{"domain":"www.wikidata.org","id":"aa1fac92-b7fa-4489-86f8-315b8805a701","dt":"2023-07-07T20:15:18.160052Z","stream":"rdf-streaming-updater.state-inconsistency"},"item":"Q107642255","original_ingestion_dt":"2023-07-07T20:13:10.666Z","revision_id":0,"original_event_info":{"dt":"2023-07-07T20:13:04Z","$schema":"/mediawiki/page/undelete/1.0.0","meta":{"id":"ef63f4e5-7e95-4f66-9d37-8ba5a548d09e","dt":"2023-07-07T20:13:04Z","stream":"mediawiki.page-undelete","request_id":"1e0c0dae-494f-4b18-b142-17cac2638a54","domain":"www.wikidata.org"}},"action_type":"page-undelete","inconsistency":"unmatched_delete","state_revision_id":1903564599,"state_status":"DELETED","dt":"2023-07-07T20:15:18.159776Z","$schema":"/rdf_streaming_updater/state_inconsistency/1.0.0"}
{"meta":{"domain":"www.wikidata.org","id":"25f6d3f5-fc77-4315-90f7-de285e06eb06","dt":"2023-07-07T20:15:21.333735Z","stream":"rdf-streaming-updater.state-inconsistency"},"item":"Q115944718","original_ingestion_dt":"2023-07-07T20:13:19.737Z","revision_id":0,"original_event_info":{"dt":"2023-07-07T20:13:18Z","$schema":"/mediawiki/page/undelete/1.0.0","meta":{"id":"447ebe40-e73e-42ab-8086-94923aec9cf0","dt":"2023-07-07T20:13:18Z","stream":"mediawiki.page-undelete","request_id":"5e85ef6a-5e7b-4455-bc0a-22b4c3e442bd","domain":"www.wikidata.org"}},"action_type":"page-undelete","inconsistency":"unmatched_delete","state_revision_id":1903564718,"state_status":"DELETED","dt":"2023-07-07T20:15:21.333421Z","$schema":"/rdf_streaming_updater/state_inconsistency/1.0.0"}
{"meta":{"domain":"www.wikidata.org","id":"179e2798-d325-462b-8445-19da7ed53bb2","dt":"2023-07-07T20:16:53.195558Z","stream":"rdf-streaming-updater.state-inconsistency"},"item":"Q107568498","original_ingestion_dt":"2023-07-07T20:14:17.663Z","revision_id":0,"original_event_info":{"dt":"2023-07-07T20:14:15Z","$schema":"/mediawiki/page/undelete/1.0.0","meta":{"id":"1c6cd889-bf2f-44fa-a9d6-bea7d795a6f5","dt":"2023-07-07T20:14:15Z","stream":"mediawiki.page-undelete","request_id":"8805c7d8-1881-403b-99cd-4c3b41e81183","domain":"www.wikidata.org"}},"action_type":"page-undelete","inconsistency":"unmatched_delete","state_revision_id":1923132198,"state_status":"DELETED","dt":"2023-07-07T20:16:53.195336Z","$schema":"/rdf_streaming_updater/state_inconsistency/1.0.0"}
Gehel set the point value for this task to 3.Jul 17 2023, 3:52 PM

Change 938887 had a related patch set uploaded (by DCausse; author: DCausse):

[mediawiki/extensions/EventBus@master] Properly pass rev_id in page-undelete events

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

Change 938887 merged by jenkins-bot:

[mediawiki/extensions/EventBus@master] Properly pass rev_id in page-undelete events

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