Fix master/replica race condition when creating null revisions
authorRoan Kattouw <roan.kattouw@gmail.com>
Sat, 3 Mar 2018 03:54:45 +0000 (19:54 -0800)
committerRoan Kattouw <roan.kattouw@gmail.com>
Sat, 3 Mar 2018 03:54:45 +0000 (19:54 -0800)
commita1e58d245584c7a3281b3ec721ad3e3cbbd5dd4b
tree7449d733714ed62f863199d9043557bbe689a7ff
parent56d67bdc9cbca4c5e2b540566c3c46c8d0dea4c9
Fix master/replica race condition when creating null revisions

RevisionStore::newFromNullRevision() carefully reads the latest revision
from the master, but then forgets to instruct emulateMainSlot_1_29() to
do the same, so the lookup query for rev_text_id in the text table is
done against a replica.

This is not usually a problem for null revisions, but it is a problem
when editing a page and then immediately moving it: this causes a null
revision to be created based on a freshly created revision, which
doesn't yet exist on the replica.

Bug: T184670
Change-Id: Ied4db5ee770716ff3edb918d2be722934c79d0c7
includes/Storage/RevisionStore.php