diff options
Diffstat (limited to 'src/mongo/db/commands/mr.cpp')
-rw-r--r-- | src/mongo/db/commands/mr.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp index 7d0d52be379..0deaf4d262f 100644 --- a/src/mongo/db/commands/mr.cpp +++ b/src/mongo/db/commands/mr.cpp @@ -656,9 +656,7 @@ void State::appendResults(BSONObjBuilder& final) { BSONObj idKey = BSON("_id" << 1); if (!_db.runCommand("admin", BSON("splitVector" << _config.outputOptions.finalNamespace.ns() - << "keyPattern" - << idKey - << "maxChunkSizeBytes" + << "keyPattern" << idKey << "maxChunkSizeBytes" << _config.splitInfo), res)) { uasserted(15921, str::stream() << "splitVector failed: " << res); @@ -746,8 +744,7 @@ long long State::postProcessCollectionNonAtomic(OperationContext* opCtx, if (!_db.runCommand("admin", BSON("renameCollection" << _config.tempNamespace.ns() << "to" << _config.outputOptions.finalNamespace.ns() - << "stayTemp" - << _config.shardedFirstPass), + << "stayTemp" << _config.shardedFirstPass), info)) { uasserted(10076, str::stream() << "rename failed: " << info); } @@ -831,9 +828,7 @@ void State::insert(const NamespaceString& nss, const BSONObj& o) { uassert( ErrorCodes::PrimarySteppedDown, str::stream() << "no longer primary while inserting mapReduce result into collection: " - << nss - << ": " - << redact(o), + << nss << ": " << redact(o), repl::ReplicationCoordinator::get(_opCtx)->canAcceptWritesFor(_opCtx, nss)); assertCollectionNotNull(nss, autoColl); @@ -880,10 +875,8 @@ void State::_insertToInc(BSONObj& o) { if (o.objsize() > BSONObjMaxUserSize) { uasserted(ErrorCodes::BadValue, str::stream() << "object to insert too large for incremental collection" - << ". size in bytes: " - << o.objsize() - << ", max size: " - << BSONObjMaxUserSize); + << ". size in bytes: " << o.objsize() + << ", max size: " << BSONObjMaxUserSize); } // TODO: Consider whether to pass OpDebug for stats tracking under SERVER-23261. @@ -932,8 +925,9 @@ State::~State() { _useIncremental ? _config.incLong : NamespaceString()); } catch (...) { error() << "Unable to drop temporary collection created by mapReduce: " - << _config.tempNamespace << ". This collection will be removed automatically " - "the next time the server starts up. " + << _config.tempNamespace + << ". This collection will be removed automatically " + "the next time the server starts up. " << exceptionToStatus(); } } |