Error
MediaWiki version: 1.35.0-wmf.16
Revision 1072801264 belongs to Q354111 instead of expected d:Q354111
More examples:
- Wikibase\Lib\Store\DivergingEntityIdException from line 154 of /srv/mediawiki/php-1.35.0-wmf.16/extensions/Wikibase/lib/includes/Store/Sql/WikiPageEntityRevisionLookup.php: Revision 835602834 belongs to Q55838615 instead of expected d:Q55838615
- Wikibase\DataModel\Services\Lookup\EntityLookupException from line 45 of /srv/mediawiki/php-1.35.0-wmf.16/extensions/Wikibase/lib/includes/Store/RevisionBasedEntityLookup.php: Revision 1089579846 belongs to P301 instead of expected Property:P301
Impact
- Doesn't seem too new, but there are certainly a lot more DivergingEntityIdException errors in the last few days
- It would be nice if we at least somehow "collect" those in Kibana/Logstash under the same message string by replacing the IDs with placeholders?
Notes
- with items and getentities: https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-deploy-2020.01.31/mediawiki/?id=AW_79CPYarkxubcmqU6z
- Also with properties: P301 in search: https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-deploy-2020.01.31/mediawiki/?id=AW_8HyLcarkxubcmtto7
Search reproduction: https://www.wikidata.org/w/api.php?action=wbsearchentities&format=json&limit=50&continue=0&language=it&uselang=it&search=Property%3AP301&type=property
getentities reproduction: https://www.wikidata.org/w/api.php?action=wbgetentities&ids=d:Q64
Solution
In our APIs we need to check that the entity id parsed is for a valid defined entity source / repo.
I say entitysource/repo as at the time of writing this we have not yet killed repo based federation to switch to entity sourced, but that will likely happen before this task is picked up.