diff options
author | Aaron Schulz <aschulz@wikimedia.org> | 2024-09-23 15:33:35 -0700 |
---|---|---|
committer | Aaron Schulz <aschulz@wikimedia.org> | 2024-10-09 20:34:25 +0000 |
commit | b69c1839d4ede374747eca8f32137b6c6fca9df6 (patch) | |
tree | 732aa10d56174f3c521821929d0f16c0738a1cba /tests/phpunit/integration | |
parent | 6c56577575b3e79e38eaaac38c6f114cfe2ca58e (diff) | |
download | mediawikicore-b69c1839d4ede374747eca8f32137b6c6fca9df6.tar.gz mediawikicore-b69c1839d4ede374747eca8f32137b6c6fca9df6.zip |
rdbms: clear replica snapshots in (begin|commit|rollback)PrimaryChanges()
Automatically perform the empty-transaction commit logic in methods
like beginPrimaryChanges() and commitPrimaryChanges(). This avoids
the proliferation of callers having to call the same set of methods
one after another for non-obvious reasons. It also discourages code
from making brittle assumptions that might fail for setups where
there is only a primary or the primary has non-zero read load.
Deprecate flushReplicaSnapshots() and remove callers.
Clarify the related method documentation.
Bug: T315664
Change-Id: I255afd22ffcaeac0fad2d4e4a2a0c55c99be7905
Diffstat (limited to 'tests/phpunit/integration')
-rw-r--r-- | tests/phpunit/integration/includes/db/DatabaseMysqlTest.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/phpunit/integration/includes/db/DatabaseMysqlTest.php b/tests/phpunit/integration/includes/db/DatabaseMysqlTest.php index 39a8fdb05610..d1a400e27521 100644 --- a/tests/phpunit/integration/includes/db/DatabaseMysqlTest.php +++ b/tests/phpunit/integration/includes/db/DatabaseMysqlTest.php @@ -197,7 +197,7 @@ class DatabaseMysqlTest extends \MediaWikiIntegrationTestCase { // Get a lock outside of any transaction $unlocker = $this->conn->getScopedLockAndFlush( 'testing-key', __METHOD__, 0 ); - // Start transaction *after* getting the lock + // Start transaction after getting the lock $this->conn->begin( __METHOD__, IDatabase::TRANSACTION_INTERNAL ); $row = $this->conn->query( 'SELECT connection_id() AS id', __METHOD__ )->fetchObject(); |