From ff95c7a4bacb77b41f2494df40665e02dc229891 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 30 Sep 2018 17:21:11 +0200 Subject: [PATCH] Fix caller name in JobRunner::commitMasterChanges 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php index dab9b14d19..1e8316795c 100644 --- a/includes/jobqueue/JobRunner.php +++ b/includes/jobqueue/JobRunner.php @@ -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 -- 2.20.1