rdbms: Ensure onTransactionPreCommitOrIdle() callbacks don't lead transactions
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 26 Jul 2017 09:04:34 +0000 (02:04 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 26 Jul 2017 21:28:48 +0000 (14:28 -0700)
commitf4e0c720a83946b6b8716731f220783731be2804
treea0d60fa31e9edb778c9e6e7a614b9abffb73f1ca
parent28db90b04c0e8cf555220311d0fd3a6acca486a2
rdbms: Ensure onTransactionPreCommitOrIdle() callbacks don't lead transactions

If no writes started a transaction yet, the callback would run
but not commit (by design, joining the request round). Later
writes will then pile on top of it.

The point of this method is to avoid such cases, so this edge
case has been fixed.

Change-Id: I9b44b19261d679de4aff6e44a9cfeb4f684ce02e
includes/libs/rdbms/database/Database.php
tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php