Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/308329

Change subject: Make deferred updates fully own their transaction rounds
......................................................................

Make deferred updates fully own their transaction rounds

This will matter when commitMasterChanges() enforcement is tighter.
For now, any thing can still call that method anytime.

Change-Id: I0b08e9e9118a6c6118c117e3856d0a8e0ca3d457
---
M includes/deferred/DeferredUpdates.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/29/308329/1

diff --git a/includes/deferred/DeferredUpdates.php 
b/includes/deferred/DeferredUpdates.php
index 24c7930..8de7cd9 100644
--- a/includes/deferred/DeferredUpdates.php
+++ b/includes/deferred/DeferredUpdates.php
@@ -221,9 +221,10 @@
        private static function runUpdate( DeferrableUpdate $update, LBFactory 
$lbFactory, $stage ) {
                $guiError = null;
                try {
-                       $lbFactory->beginMasterChanges( __METHOD__ );
+                       $fnameTrxOwner = get_class( $update ) . '::doUpdate';
+                       $lbFactory->beginMasterChanges( $fnameTrxOwner );
                        $update->doUpdate();
-                       $lbFactory->commitMasterChanges( __METHOD__ );
+                       $lbFactory->commitMasterChanges( $fnameTrxOwner );
                } catch ( Exception $e ) {
                        // Reporting GUI exceptions does not work post-send
                        if ( $e instanceof ErrorPageError && $stage === 
self::PRESEND ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b08e9e9118a6c6118c117e3856d0a8e0ca3d457
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

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

Reply via email to