ActorMigration: Remove possibility of read-both
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 18 Sep 2018 18:21:20 +0000 (14:21 -0400)
committerTim Starling <tstarling@wikimedia.org>
Thu, 11 Oct 2018 01:12:00 +0000 (12:12 +1100)
commit993baa3493f17161847ce4545927d42e7861aae9
treeeb8e7fa188e80e51225cf455ae88f2929db803ff
parentc9b599ababfa270fa1c8dcf25600c1c0448b03e7
ActorMigration: Remove possibility of read-both

When this was originally written, the plan was to read both the old and
new fields during the transition period, while stopping writes to them
midway through. It turns out that the WHERE conditions to do read-both
correctly are generally not handled well by the database and working
around that would require a lot of complicated code (see what's being
removed from ApiQueryUserContribs here, for example).

We can simplify things greatly by instead having it write both fields
during the transition period, reading from the old for the first part
and the new for the second part, as is being done for MCR.

Bug: T204669
Change-Id: I4764c1c7883dc1003cb12729455c8107319f70b1
Depends-On: I845f6ae462f2539ebd35cbb5f2ca8b5714e2c1fb
Depends-On: I88b31b977543fdbdf69f8c1158e77e448df94e11
41 files changed:
RELEASE-NOTES-1.32
includes/ActorMigration.php
includes/Block.php
includes/DefaultSettings.php
includes/Revision.php
includes/actions/InfoAction.php
includes/api/ApiQueryAllUsers.php
includes/api/ApiQueryContributors.php
includes/api/ApiQueryUserContribs.php
includes/cache/UserCache.php
includes/changes/RecentChange.php
includes/db/DatabaseOracle.php
includes/filerepo/file/ArchivedFile.php
includes/filerepo/file/LocalFile.php
includes/filerepo/file/OldLocalFile.php
includes/installer/DatabaseUpdater.php
includes/logging/LogEntry.php
includes/page/WikiPage.php
includes/revisiondelete/RevDelList.php
includes/revisiondelete/RevisionDeleteUser.php
includes/specials/SpecialLog.php
includes/specials/pagers/ContribsPager.php
includes/specials/pagers/NewFilesPager.php
includes/user/User.php
maintenance/initEditCount.php
maintenance/migrateActors.php
maintenance/populateLogSearch.php
maintenance/reassignEdits.php
maintenance/removeUnusedAccounts.php
maintenance/rollbackEdits.php
tests/parser/ParserTestRunner.php
tests/phpunit/includes/ActorMigrationTest.php
tests/phpunit/includes/Revision/RevisionQueryInfoTest.php
tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php
tests/phpunit/includes/RevisionDbTestBase.php
tests/phpunit/includes/RevisionTest.php
tests/phpunit/includes/api/query/ApiQueryUserContribsTest.php
tests/phpunit/includes/logging/DatabaseLogEntryTest.php
tests/phpunit/includes/page/PageArchiveTestBase.php
tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
tests/phpunit/includes/user/UserTest.php