summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/rs_rollback.cpp
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2016-05-28 17:55:12 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2016-05-28 17:55:12 -0400
commit6dcdd23dd37ef12c87e71cf59ef01cd82432efe0 (patch)
treec8cfb5acb62c80f375bc37e7d4350382deea6a37 /src/mongo/db/repl/rs_rollback.cpp
parentd4ac5673ea3f6cef4ce9dbcec90e31813997a528 (diff)
downloadmongo-6dcdd23dd37ef12c87e71cf59ef01cd82432efe0.tar.gz
SERVER-23971 Clang-Format code
Diffstat (limited to 'src/mongo/db/repl/rs_rollback.cpp')
-rw-r--r--src/mongo/db/repl/rs_rollback.cpp38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/mongo/db/repl/rs_rollback.cpp b/src/mongo/db/repl/rs_rollback.cpp
index bb5531dbf34..0663c13e4dd 100644
--- a/src/mongo/db/repl/rs_rollback.cpp
+++ b/src/mongo/db/repl/rs_rollback.cpp
@@ -37,17 +37,17 @@
#include <memory>
#include "mongo/bson/util/bson_extract.h"
-#include "mongo/db/auth/authorization_manager_global.h"
#include "mongo/db/auth/authorization_manager.h"
+#include "mongo/db/auth/authorization_manager_global.h"
#include "mongo/db/catalog/collection.h"
#include "mongo/db/catalog/collection_catalog_entry.h"
#include "mongo/db/catalog/document_validation.h"
#include "mongo/db/client.h"
#include "mongo/db/commands.h"
#include "mongo/db/concurrency/write_conflict_exception.h"
+#include "mongo/db/db_raii.h"
#include "mongo/db/dbhelpers.h"
#include "mongo/db/exec/working_set_common.h"
-#include "mongo/db/db_raii.h"
#include "mongo/db/ops/delete.h"
#include "mongo/db/ops/update.h"
#include "mongo/db/ops/update_lifecycle_impl.h"
@@ -454,7 +454,8 @@ void syncFixUp(OperationContext* txn,
auto status = options.parse(optionsField.Obj());
if (!status.isOK()) {
throw RSFatalException(str::stream() << "Failed to parse options " << info
- << ": " << status.toString());
+ << ": "
+ << status.toString());
}
} else {
// Use default options.
@@ -467,19 +468,19 @@ void syncFixUp(OperationContext* txn,
auto status = collection->setValidator(txn, options.validator);
if (!status.isOK()) {
- throw RSFatalException(str::stream()
- << "Failed to set validator: " << status.toString());
+ throw RSFatalException(str::stream() << "Failed to set validator: "
+ << status.toString());
}
status = collection->setValidationAction(txn, options.validationAction);
if (!status.isOK()) {
- throw RSFatalException(str::stream()
- << "Failed to set validationAction: " << status.toString());
+ throw RSFatalException(str::stream() << "Failed to set validationAction: "
+ << status.toString());
}
status = collection->setValidationLevel(txn, options.validationLevel);
if (!status.isOK()) {
- throw RSFatalException(str::stream()
- << "Failed to set validationLevel: " << status.toString());
+ throw RSFatalException(str::stream() << "Failed to set validationLevel: "
+ << status.toString());
}
wuow.commit();
@@ -822,7 +823,8 @@ Status _syncRollback(OperationContext* txn,
if (!replCoord->setFollowerMode(MemberState::RS_ROLLBACK)) {
return Status(ErrorCodes::OperationFailed,
str::stream() << "Cannot transition from "
- << replCoord->getMemberState().toString() << " to "
+ << replCoord->getMemberState().toString()
+ << " to "
<< MemberState(MemberState::RS_ROLLBACK).toString());
}
}
@@ -833,8 +835,9 @@ Status _syncRollback(OperationContext* txn,
{
log() << "rollback 2 FindCommonPoint";
try {
- auto processOperationForFixUp =
- [&how](const BSONObj& operation) { return refetch(how, operation); };
+ auto processOperationForFixUp = [&how](const BSONObj& operation) {
+ return refetch(how, operation);
+ };
auto res = syncRollBackLocalOperations(
localOplog, rollbackSource.getOplog(), processOperationForFixUp);
if (!res.isOK()) {
@@ -856,7 +859,8 @@ Status _syncRollback(OperationContext* txn,
return Status(ErrorCodes::UnrecoverableRollbackError,
str::stream()
<< "need to rollback, but unable to determine common point between"
- " local and remote oplog: " << e.what(),
+ " local and remote oplog: "
+ << e.what(),
18752);
} catch (const DBException& e) {
warning() << "rollback 2 exception " << e.toString() << "; sleeping 1 min";
@@ -912,11 +916,9 @@ Status syncRollback(OperationContext* txn,
const OplogInterface& localOplog,
const RollbackSource& rollbackSource,
ReplicationCoordinator* replCoord) {
- return syncRollback(txn,
- localOplog,
- rollbackSource,
- replCoord,
- [](Seconds seconds) { sleepsecs(durationCount<Seconds>(seconds)); });
+ return syncRollback(txn, localOplog, rollbackSource, replCoord, [](Seconds seconds) {
+ sleepsecs(durationCount<Seconds>(seconds));
+ });
}
} // namespace repl