* - a) unexpected operation errors occurred (network partitions, disk full...)
* - b) significant operation errors occurred and 'force' was not set
*
- * @param $performOps Array List of FileOp operations
- * @param $opts Array Batch operation options
- * @param $journal FileJournal Journal to log operations to
+ * @param array $performOps List of FileOp operations
+ * @param array $opts Batch operation options
+ * @param FileJournal $journal Journal to log operations to
* @return Status
*/
public static function attempt( array $performOps, array $opts, FileJournal $journal ) {
if ( $n > self::MAX_BATCH_SIZE ) {
$status->fatal( 'backend-fail-batchsize', $n, self::MAX_BATCH_SIZE );
wfProfileOut( __METHOD__ );
+
return $status;
}
++$status->failCount;
if ( !$ignoreErrors ) {
wfProfileOut( __METHOD__ );
+
return $status; // abort
}
}
$subStatus = $journal->logChangeBatch( $entries, $batchId );
if ( !$subStatus->isOK() ) {
wfProfileOut( __METHOD__ );
+
return $subStatus; // abort
}
}
self::runParallelBatches( $pPerformOps, $status );
wfProfileOut( __METHOD__ );
+
return $status;
}
* within any given sub-batch do not depend on each other.
* This will abort remaining ops on failure.
*
- * @param $pPerformOps Array
- * @param $status Status
+ * @param array $pPerformOps
+ * @param Status $status
* @return bool Success
*/
protected static function runParallelBatches( array $pPerformOps, Status $status ) {
}
}
}
+
return $status;
}
}