Пример #1
0
 void BatchWriteOp::noteBatchError( const TargetedWriteBatch& targetedBatch,
                                    const BatchedErrorDetail& error ) {
     BatchedCommandResponse response;
     response.setOk( false );
     cloneBatchErrorFrom( error, &response );
     noteBatchResponse( targetedBatch, response, NULL );
 }
Пример #2
0
    void BatchWriteOp::noteBatchError( const TargetedWriteBatch& targetedBatch,
                                       const WriteErrorDetail& error ) {

        // Treat errors to get a batch response as failures of the contained writes
        BatchedCommandResponse emulatedResponse;
        toWriteErrorResponse( error,
                              _clientRequest->getOrdered(),
                              targetedBatch.getWrites().size(),
                              &emulatedResponse );

        noteBatchResponse( targetedBatch, emulatedResponse, NULL );
    }