rdbms: allow cancelation of dangling nested atomic sections
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 29 Mar 2018 07:23:10 +0000 (00:23 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 10 Apr 2018 23:34:31 +0000 (16:34 -0700)
commit477b83594599ed7b35f3826e4b849ab43cb12ad4
tree5e55c26fbde1b8d61b72c4f194c9ddba875428b2
parent0898ab0a5d99c0d92c83d26d8b8b090f76e023de
rdbms: allow cancelation of dangling nested atomic sections

* Make startAtomic() return a token that can be used with cancelAtomic()
  cancel any nested atomic sections that have not yet been ended.
* Make doAtomicSection() clear dangling nested sections by default.
* Also give doAtomicSection() a $cancelable parameter, having the
  same default as startAtomic().

Change-Id: I75fa234cb1dcfef17dc9a973a3b02d2607efa98e
autoload.php
includes/libs/rdbms/database/AtomicSectionIdentifier.php [new file with mode: 0644]
includes/libs/rdbms/database/DBConnRef.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/IDatabase.php
tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php