Aaron Schulz has uploaded a new change for review.

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

Change subject: Fix LocalRenameJob transaction owner to match JobRunner
......................................................................

Fix LocalRenameJob transaction owner to match JobRunner

Change-Id: If2246effeb271a554af46dda498afaaac9b9e5e1
---
M includes/LocalRenameJob/LocalRenameJob.php
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/26/310626/1

diff --git a/includes/LocalRenameJob/LocalRenameJob.php 
b/includes/LocalRenameJob/LocalRenameJob.php
index 7d88c53..5042f0f 100644
--- a/includes/LocalRenameJob/LocalRenameJob.php
+++ b/includes/LocalRenameJob/LocalRenameJob.php
@@ -32,8 +32,9 @@
                // Clear any REPEATABLE-READ snapshot in case the READ_LOCKING 
blocked above. We want
                // regular non-locking SELECTs to see all the changes from that 
transaction we waited on.
                // Making a new transaction also reduces deadlocks from the 
locking read.
+               $fnameTrxOwner = get_class( $this ) . '::' . __FUNCTION__; // 
T145596
                $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-               $factory->commitMasterChanges( __METHOD__ );
+               $factory->commitMasterChanges( $fnameTrxOwner );
 
                if ( $status !== 'queued' && $status !== 'failed' ) {
                        LoggerFactory::getInstance( 'rename' )->info( 'skipping 
duplicate rename from {user}', [
@@ -55,13 +56,13 @@
                        } );
                }
                try {
-                       $this->doRun( __METHOD__ );
+                       $this->doRun( $fnameTrxOwner );
                        $this->addTeardownCallback( [ $this, 'scheduleNextWiki' 
] );
                } catch ( Exception $e ) {
                        // This will lock the user out of their account until a 
sysadmin intervenes
-                       $factory->rollbackMasterChanges( __METHOD__ );
+                       $factory->rollbackMasterChanges( $fnameTrxOwner );
                        $this->updateStatus( 'failed' );
-                       $factory->commitMasterChanges( __METHOD__ );
+                       $factory->commitMasterChanges( $fnameTrxOwner );
                        throw $e;
                }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2246effeb271a554af46dda498afaaac9b9e5e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
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