Guard Database::explicitTrxActive() against returning false while in begin()
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 9 Oct 2016 17:47:49 +0000 (10:47 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 11 Oct 2016 19:50:51 +0000 (12:50 -0700)
commit103a5f06b1f6ec0d333d99bde8462873a13b4997
tree64a08429bb5d493aa6c8a983eab930f68f3d4bd8
parent208851e5ec89677f73ad236c24b2f44d3e154168
Guard Database::explicitTrxActive() against returning false while in begin()

This can happen in the special case of the srvCache using callbacks
triggered by getApproximateLagStatus(). Treat the transaction as
explicit until begin() finishes to avoid this since it can cause
transaction nesting errors if caller thinks its OK to commit when
startAtomic() is still in progress.

Bug: T147697
Change-Id: If1c0f14f6a72cbcbee365afab8ee5a0872e746c8
includes/libs/rdbms/database/Database.php