From a14ef9125193e5ac3c557d43c2fea3f3dec26440 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 7 Mar 2016 13:55:27 -0800 Subject: [PATCH] Add FileOperationReplication log to improve multiwrite backend logging Change-Id: I541eac740f4a07182067294c9597cdd49330e86c --- includes/filebackend/FileBackendMultiWrite.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/filebackend/FileBackendMultiWrite.php b/includes/filebackend/FileBackendMultiWrite.php index 5a103c647b..6f40bda945 100644 --- a/includes/filebackend/FileBackendMultiWrite.php +++ b/includes/filebackend/FileBackendMultiWrite.php @@ -202,11 +202,17 @@ class FileBackendMultiWrite extends FileBackend { if ( $this->asyncWrites && !$this->hasVolatileSources( $ops ) ) { // Bind $scopeLock to the callback to preserve locks DeferredUpdates::addCallableUpdate( - function() use ( $backend, $realOps, $opts, $scopeLock ) { + function() use ( $backend, $realOps, $opts, $scopeLock, $relevantPaths ) { + wfDebugLog( 'FileOperationReplication', + "'{$backend->getName()}' async replication; paths: " . + FormatJson::encode( $relevantPaths ) ); $backend->doOperations( $realOps, $opts ); } ); } else { + wfDebugLog( 'FileOperationReplication', + "'{$backend->getName()}' sync replication; paths: " . + FormatJson::encode( $relevantPaths ) ); $status->merge( $backend->doOperations( $realOps, $opts ) ); } } -- 2.20.1