| daniel created this task. daniel added projects: Availability, Wikidata, MediaWiki-extensions-WikibaseRepository. Herald added a subscriber: Zppix. |
Currently, if WikiPageEntityMetaDataLookup::loadRevisionInformation fails to find an Entity, it will try to load it from the master database. This is done to avoid race conditions when loading entities right after creating them.
We now want to disable this fallback when it is not absolutely needed, so we don't hit the master database in GET requests.
Proposal:
WikiPageEntityMetaDataLookup::loadRevisionInformation already has a $mode parameter, which controls whether we first try the slave DB, or if we hit the master DB directly, see EntityRevisionLookup::LATEST_FROM_SLAVE and EntityRevisionLookup::LATEST_FROM_MASTER. LATEST_FROM_SLAVE is currently the default.
We should redefine LATEST_FROM_SLAVE to not fall back to the DB, and introduce a new mode LATEST_FROM_SLAVE_OR_MASTER to enable fallback. That mode would e.g. be used in jobs that handle change notifications on the client.
Cc: Zppix, Glaisher, MZMcBride, Nemo_bis, Gilles, aaron, Aklapper, gerritbot, PleaseStand, Krenair, Joe, aude, hoo, daniel, D3r1ck01, Izno, Wikidata-bugs, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
