Watchlist: Commit after each batch watchlist insertion and removal
authorKosta Harlan <kharlan@wikimedia.org>
Tue, 2 Oct 2018 19:55:53 +0000 (15:55 -0400)
committerKosta Harlan <kharlan@wikimedia.org>
Thu, 18 Oct 2018 18:33:50 +0000 (14:33 -0400)
commit05b490bc4a1fa001ef1aa08e0dc960a841897a45
treeac7a77d70ccaccca69cae800a72624fe70312680
parent9852bdaa6a21ac8103be4221ce9ca8768ae94822
Watchlist: Commit after each batch watchlist insertion and removal

With this change, adding large numbers (500+) of items to one's Watchlist via
Special:EditWatchlist/raw will no longer trigger DBPerformance warnings
for "max affected rows expectation not met". The same code mechanism is added
for bulk removal of watchlist items.

Bug: T171898
Depends-On: Ia0f496b8bfb2b68217d0f45f892045538494bfdc
Change-Id: I832b1843d1341b05227cdee2549bdcefa21eb300
includes/specials/SpecialEditWatchlist.php
includes/watcheditem/NoWriteWatchedItemStore.php
includes/watcheditem/WatchedItemStore.php
includes/watcheditem/WatchedItemStoreInterface.php
tests/phpunit/includes/watcheditem/WatchedItemStoreUnitTest.php