summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/database_cloner.cpp
diff options
context:
space:
mode:
authorsamantharitter <samantha.ritter@10gen.com>2017-03-21 09:56:51 -0400
committersamantharitter <samantha.ritter@10gen.com>2017-03-22 15:18:40 -0400
commit089ce06088bbafd4c862863a8aefb4c891bdc2ba (patch)
tree3af6cd5a7eda3900bf211a2d69a112819ccd5742 /src/mongo/db/repl/database_cloner.cpp
parente15d99fc1bb2b4010a3f1cdb2dfef15259f46f45 (diff)
downloadmongo-089ce06088bbafd4c862863a8aefb4c891bdc2ba.tar.gz
SERVER-28294 Host CollectionUUID on top of standalone UUID library
Diffstat (limited to 'src/mongo/db/repl/database_cloner.cpp')
-rw-r--r--src/mongo/db/repl/database_cloner.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/repl/database_cloner.cpp b/src/mongo/db/repl/database_cloner.cpp
index f7b4cbbc3f7..fe892ba157f 100644
--- a/src/mongo/db/repl/database_cloner.cpp
+++ b/src/mongo/db/repl/database_cloner.cpp
@@ -353,12 +353,12 @@ void DatabaseCloner::_listCollectionsCallback(const StatusWith<Fetcher::QueryRes
if (infoElement.isABSONObj()) {
BSONElement uuidElement = infoElement[kUUIDFieldName];
if (!uuidElement.eoo()) {
- try {
- options.uuid.emplace(uuidElement);
- } catch (const UserException& ex) {
- _finishCallback_inlock(lk, ex.toStatus());
+ auto res = CollectionUUID::parse(uuidElement);
+ if (!res.isOK()) {
+ _finishCallback_inlock(lk, res.getStatus());
return;
}
+ options.uuid = res.getValue();
}
}
// TODO(SERVER-27994): Ensure UUID present when FCV >= "3.6".