jenkins-bot has submitted this change and it was merged.

Change subject: Made the DB profiler use startAtomic()
......................................................................


Made the DB profiler use startAtomic()

Change-Id: I6eadd071c16781b320d0c8c518e6184a4c38d874
---
M includes/profiler/ProfilerSimpleDB.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/profiler/ProfilerSimpleDB.php 
b/includes/profiler/ProfilerSimpleDB.php
index 38a6436..7ef0ad0 100644
--- a/includes/profiler/ProfilerSimpleDB.php
+++ b/includes/profiler/ProfilerSimpleDB.php
@@ -58,7 +58,7 @@
                        $dbw = wfGetDB( DB_MASTER );
                        $useTrx = ( $dbw->getType() === 'sqlite' ); // much 
faster
                        if ( $useTrx ) {
-                               $dbw->begin();
+                               $dbw->startAtomic( __METHOD__ );
                        }
                        foreach ( $this->mCollated as $name => $data ) {
                                $eventCount = $data['count'];
@@ -103,7 +103,7 @@
                                //     "pf_time=pf_time + VALUES(pf_time)";
                        }
                        if ( $useTrx ) {
-                               $dbw->commit();
+                               $dbw->endAtomic( __METHOD__ );
                        }
                } catch ( DBError $e ) {
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/160883
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6eadd071c16781b320d0c8c518e6184a4c38d874
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to