[FileBackend] Added concatenate() failure logging.
authorAaron <aschulz@wikimedia.org>
Mon, 10 Sep 2012 21:01:29 +0000 (14:01 -0700)
committerAaron <aschulz@wikimedia.org>
Mon, 10 Sep 2012 21:01:29 +0000 (14:01 -0700)
Change-Id: Iebc0f6e4caf57e44903dd3f0db6e3f95d589f13e

includes/filebackend/FileBackendStore.php

index 5771560..083dfea 100644 (file)
@@ -292,8 +292,14 @@ abstract class FileBackendStore extends FileBackend {
                // Try to lock the source files for the scope of this function
                $scopeLockS = $this->getScopedFileLocks( $params['srcs'], LockManager::LOCK_UW, $status );
                if ( $status->isOK() ) {
-                       // Actually do the concatenation
+                       // Actually do the file concatenation...
+                       $start_time = microtime( true );
                        $status->merge( $this->doConcatenate( $params ) );
+                       $sec = microtime( true ) - $start_time;
+                       if ( !$status->isOK() ) {
+                               wfDebugLog( 'FileOperation', get_class( $this ) . " failed to concatenate " .
+                                       count( $params['srcs'] ) . " file(s) [$sec sec]" );
+                       }
                }
 
                wfProfileOut( __METHOD__ . '-' . $this->name );