Move user_editcount updates to a mergeable deferred update
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 22 Oct 2018 22:58:02 +0000 (15:58 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 25 Oct 2018 22:32:18 +0000 (15:32 -0700)
commit390fce6db1e008c53580cedbdfe18dff3de9c766
treea6f26a7d8c50d0de663a3be87bc370b0c55c2b99
parent26665a6974598591746365b5ef189205c470e367
Move user_editcount updates to a mergeable deferred update

This should reduce excess contention and lock timeouts.
Previously, it used a pre-commit hook which ran just before the
end of the DB transaction round.

Also removed unused User::incEditCountImmediate() method.

Bug: T202715
Depends-on: I6d239a5ea286afb10d9e317b2ee1436de60f7e4f
Depends-on: I0ad3d17107efc7b0e59f1dd54d5733cd1572a2b7
Change-Id: I0d6d7ddd91bbb21995142808248d162e05696d47
autoload.php
includes/deferred/MergeableUpdate.php
includes/deferred/UserEditCountUpdate.php [new file with mode: 0644]
includes/user/User.php
tests/phpunit/includes/api/ApiStashEditTest.php
tests/phpunit/includes/user/UserTest.php