Fix caller name in JobRunner::commitMasterChanges
authorUmherirrender <umherirrender_de.wp@web.de>
Sun, 30 Sep 2018 15:21:11 +0000 (17:21 +0200)
committerUmherirrender <umherirrender_de.wp@web.de>
Mon, 1 Oct 2018 18:48:36 +0000 (18:48 +0000)
Use the given fname for all places.
The __METHOD__ inside the unlock closure would be shown as {closure} in
logs

Change-Id: I87ef26e893af858f58d1a77dcb2d8ee192456f5c

includes/jobqueue/JobRunner.php

index dab9b14..1e83167 100644 (file)
@@ -576,12 +576,12 @@ class JobRunner implements LoggerAwareInterface {
                $this->debugCallback( $msg );
 
                // Wait for an exclusive lock to commit
-               if ( !$dbwSerial->lock( 'jobrunner-serial-commit', __METHOD__, 30 ) ) {
+               if ( !$dbwSerial->lock( 'jobrunner-serial-commit', $fnameTrxOwner, 30 ) ) {
                        // This will trigger a rollback in the main loop
                        throw new DBError( $dbwSerial, "Timed out waiting on commit queue." );
                }
-               $unlocker = new ScopedCallback( function () use ( $dbwSerial ) {
-                       $dbwSerial->unlock( 'jobrunner-serial-commit', __METHOD__ );
+               $unlocker = new ScopedCallback( function () use ( $dbwSerial, $fnameTrxOwner ) {
+                       $dbwSerial->unlock( 'jobrunner-serial-commit', $fnameTrxOwner );
                } );
 
                // Wait for the replica DBs to catch up