Page MenuHomePhabricator

Remove fallback to master logic from resolver
Closed, ResolvedPublic

Description

DatabaseTermIdsResolver has a logic that supports falling back to reading from master in case the resolved terms from replica do not cover all the ids that the user has asked for.

Such a case can happen in one of two situations:

  1. the ids to be resolved were fetched from master, and the linked terms hasn't been replicated yet
  2. the ids to be resolved were fetched from replica, and the linked terms hasn't been replicated yet

The first one we have judged has no real use-case that we are aware of. A user that is trying to resolve term ids using that resolver must have also fetched the ids from replica in the first place, as we do not usually read from master unless explicitly specified or as part of write logic.

The second case is very unlikely to hit as replication of item/property terms will be quickly followed by replication of any related terms, if not preceded as terms are written to term store before property/item terms are linked to them.

So the conclusion was to remove this fallback logic as it simplifies the implementation, and allows a cleaner and more straight forward implementation of filtering logic (where this issue was discovered) as described in T225003.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 12 2019, 1:10 PM

Change 516624 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@master] Remove master fallback logic and option in DatabaseTermIdsResolver

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

alaa_wmde added a subscriber: hoo.

@hoo this is ready for review and to base the patch for parent task on it

Change 516624 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Remove master fallback logic and option in DatabaseTermIdsResolver

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

alaa_wmde closed this task as Resolved.Jun 13 2019, 11:50 AM