From 182b331aa974dfedae7dd22e4b3c0533d553026e Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 12 Sep 2014 15:58:40 -0700 Subject: [PATCH] Made SiteSQLStore use startAtomic() instead of DIY Change-Id: I3f47675646d772b4718086e2715e243da3a16bab --- includes/site/SiteSQLStore.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/includes/site/SiteSQLStore.php b/includes/site/SiteSQLStore.php index 665940786f..944e9e261e 100644 --- a/includes/site/SiteSQLStore.php +++ b/includes/site/SiteSQLStore.php @@ -314,11 +314,7 @@ class SiteSQLStore implements SiteStore { $dbw = $this->sitesTable->getWriteDbConnection(); - $trx = $dbw->trxLevel(); - - if ( $trx == 0 ) { - $dbw->begin( __METHOD__ ); - } + $dbw->startAtomic( __METHOD__ ); $success = true; @@ -360,9 +356,7 @@ class SiteSQLStore implements SiteStore { ); } - if ( $trx == 0 ) { - $dbw->commit( __METHOD__ ); - } + $dbw->endAtomic( __METHOD__ ); // purge cache $this->reset(); -- 2.20.1