Make MultiWriteBagOStuff use the native merge() of each backend
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 10 Jul 2018 23:26:43 +0000 (00:26 +0100)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 18 Jul 2018 21:30:56 +0000 (22:30 +0100)
commit12200a2332c99a90cb47aa7cf15aee479921897a
tree66fd4e6efcd0aea947c4da5c056aae9253fcf345
parent6934d1db0327890655e1429bbbfe173f080df45a
Make MultiWriteBagOStuff use the native merge() of each backend

This lets backends that support CAS take advantage of it.

Also fix race condition with merge() in asyncWrites mode where two
threads might add to a list/set but the first request finishes after
the second, which would erase an item during the set().

Bug: T198239
Change-Id: Ibd2539429746f12b4de74d0f031089cb80aa8b4b
includes/libs/objectcache/MultiWriteBagOStuff.php