From 8d49054385b3715c8459e3a7bcb14bb1945710db Mon Sep 17 00:00:00 2001 From: Geert Bosch Date: Mon, 8 Jun 2015 11:31:57 -0400 Subject: SERVER-17259: Handle disappearance of collection during M/R (cherry-picked from 7a037260a8118aeaf5ff73a9f7ba01e633589bac) Conflicts: src/mongo/db/commands/mr.cpp --- src/mongo/db/commands/mr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp index 057dfb1b5b4..f2be6826a74 100644 --- a/src/mongo/db/commands/mr.cpp +++ b/src/mongo/db/commands/mr.cpp @@ -639,8 +639,8 @@ namespace mongo { bool found; { Client::Context tx(txn, _config.outputOptions.finalNamespace); - Collection* coll = - tx.db()->getCollection(_config.outputOptions.finalNamespace); + const std::string& finalNamespace = _config.outputOptions.finalNamespace; + Collection* coll = getCollectionOrUassert(tx.db(), finalNamespace); found = Helpers::findOne(_txn, coll, temp["_id"].wrap(), -- cgit v1.2.1