diff options
Diffstat (limited to 'src/mongo/db/repl/database_cloner.cpp')
-rw-r--r-- | src/mongo/db/repl/database_cloner.cpp | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/mongo/db/repl/database_cloner.cpp b/src/mongo/db/repl/database_cloner.cpp index da4d3c33887..37e53a97776 100644 --- a/src/mongo/db/repl/database_cloner.cpp +++ b/src/mongo/db/repl/database_cloner.cpp @@ -219,16 +219,17 @@ void DatabaseCloner::_listCollectionsCallback(const StatusWith<Fetcher::QueryRes for (auto&& info : _collectionInfos) { BSONElement nameElement = info.getField(kNameFieldName); if (nameElement.eoo()) { - _finishCallback(Status(ErrorCodes::FailedToParse, - str::stream() << "collection info must contain '" - << kNameFieldName << "' " - << "field : " << info)); + _finishCallback( + Status(ErrorCodes::FailedToParse, + str::stream() << "collection info must contain '" << kNameFieldName << "' " + << "field : " + << info)); return; } if (nameElement.type() != mongo::String) { - _finishCallback(Status(ErrorCodes::TypeMismatch, - str::stream() << "'" << kNameFieldName - << "' field must be a string: " << info)); + _finishCallback(Status( + ErrorCodes::TypeMismatch, + str::stream() << "'" << kNameFieldName << "' field must be a string: " << info)); return; } const std::string collectionName = nameElement.String(); @@ -236,22 +237,27 @@ void DatabaseCloner::_listCollectionsCallback(const StatusWith<Fetcher::QueryRes _finishCallback(Status(ErrorCodes::DuplicateKey, str::stream() << "collection info contains duplicate collection name " - << "'" << collectionName << "': " << info)); + << "'" + << collectionName + << "': " + << info)); return; } BSONElement optionsElement = info.getField(kOptionsFieldName); if (optionsElement.eoo()) { - _finishCallback(Status(ErrorCodes::FailedToParse, - str::stream() << "collection info must contain '" - << kOptionsFieldName << "' " - << "field : " << info)); + _finishCallback(Status( + ErrorCodes::FailedToParse, + str::stream() << "collection info must contain '" << kOptionsFieldName << "' " + << "field : " + << info)); return; } if (!optionsElement.isABSONObj()) { _finishCallback(Status(ErrorCodes::TypeMismatch, str::stream() << "'" << kOptionsFieldName - << "' field must be an object: " << info)); + << "' field must be an object: " + << info)); return; } const BSONObj optionsObj = optionsElement.Obj(); |