*
* The StatusValue will be "OK" unless:
* - a) unexpected operation errors occurred (network partitions, disk full...)
- * - b) significant operation errors occurred and 'force' was not set
+ * - b) predicted operation errors occurred and 'force' was not set
*
* @param array $ops List of operations to execute in order
* @param array $opts Batch operation options
* any checks from "syncChecks" are still synchronous.
*
* @param array $config
- * @throws FileBackendError
+ * @throws LogicException
*/
public function __construct( array $config ) {
parent::__construct( $config );
$masterStatus = $mbe->doOperations( $realOps, $opts );
$status->merge( $masterStatus );
// Propagate the operations to the clone backends if there were no unexpected errors
- // and if there were either no expected errors or if the 'force' option was used.
- // However, if nothing succeeded at all, then don't replicate any of the operations.
- // If $ops only had one operation, this might avoid backend sync inconsistencies.
+ // and everything didn't fail due to predicted errors. If $ops only had one operation,
+ // this might avoid backend sync inconsistencies.
if ( $masterStatus->isOK() && $masterStatus->successCount > 0 ) {
foreach ( $this->backends as $index => $backend ) {
if ( $index === $this->masterIndex ) {
continue;
}
}
- if ( ( $this->syncChecks & self::CHECK_SHA1 ) && $cBackend->getFileSha1Base36( $cParams ) !== $mSha1 ) { // wrong SHA1
+ if (
+ ( $this->syncChecks & self::CHECK_SHA1 ) &&
+ $cBackend->getFileSha1Base36( $cParams ) !== $mSha1
+ ) { // wrong SHA1
$status->fatal( 'backend-fail-synced', $path );
continue;
}
*
* The resulting StatusValue will be "OK" unless:
* - a) unexpected operation errors occurred (network partitions, disk full...)
- * - b) significant operation errors occurred and 'force' was not set
+ * - b) predicted operation errors occurred and 'force' was not set
*
* @param FileOp[] $performOps List of FileOp operations
* @param array $opts Batch operation options