There seems to be a problem with sitelinks after certain item mergers at Wikidata. Scenario: item A with sitelink "foo" is merged into item B with sitelink "bar". The corrupted post-merge situation is described as followed:
- "foo" and "bar" appear in the merged item (Web UI, also JSON representation and so on)
- "foo" does *not* appear in WDQS as a sitelink of any item, but "bar" does
- "foo" does *not* appear in Wikidata's wb_item_per_site table, but "bar" does
- "foo" does *not* appear in the local page_props table
- page "foo" appears locally unconnected, and it can indeed be connected to another item than the merge target
- page "bar" does see "foo" locally as an interwikilink
The sitelink situation seems pretty corrupted. This has also been reported with specific examples at Wikidata:Contact the development team, including mentions of specific cases.
investigate for 4h
- why this happened? was it caused by the dead-locks issue T234948: New Wikibase deadlocks on Wikidata wiki since 2019-10-08T00:00:02: Wikibase\Lib\Store\Sql\Terms\{closure} Deadlock found when trying to get lock; try restarting transaction and is it then solved already?
- how can we fix corrupted merged entities automatically?