From: Aaron Schulz Date: Mon, 7 Mar 2016 21:55:27 +0000 (-0800) Subject: Add FileOperationReplication log to improve multiwrite backend logging X-Git-Tag: 1.31.0-rc.0~7721^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=a14ef9125193e5ac3c557d43c2fea3f3dec26440;p=lhc%2Fweb%2Fwiklou.git Add FileOperationReplication log to improve multiwrite backend logging Change-Id: I541eac740f4a07182067294c9597cdd49330e86c --- 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 ) ); } }