diff options
Diffstat (limited to 'src/mongo/s/client/parallel.cpp')
-rw-r--r-- | src/mongo/s/client/parallel.cpp | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/src/mongo/s/client/parallel.cpp b/src/mongo/s/client/parallel.cpp index 7903b2c48e5..85df5bf1720 100644 --- a/src/mongo/s/client/parallel.cpp +++ b/src/mongo/s/client/parallel.cpp @@ -49,9 +49,9 @@ namespace mongo { -using std::shared_ptr; using std::map; using std::set; +using std::shared_ptr; using std::string; using std::vector; @@ -565,10 +565,11 @@ void ParallelSortClusteredCursor::startInit(OperationContext* opCtx) { // shard or if we keep better track of chunks, we can actually add the skip // value into the cursor and/or make some assumptions about the return value // size ( (batch size + skip amount) / num_servers ). - _qSpec.ntoreturn() == 0 ? 0 : (_qSpec.ntoreturn() > 0 - ? _qSpec.ntoreturn() + _qSpec.ntoskip() - : _qSpec.ntoreturn() - - _qSpec.ntoskip()))); // batchSize + _qSpec.ntoreturn() == 0 + ? 0 + : (_qSpec.ntoreturn() > 0 + ? _qSpec.ntoreturn() + _qSpec.ntoskip() + : _qSpec.ntoreturn() - _qSpec.ntoskip()))); // batchSize } else { // Single shard query @@ -596,9 +597,9 @@ void ParallelSortClusteredCursor::startInit(OperationContext* opCtx) { // Without full initialization, throw an exception uassert(15987, - str::stream() << "could not fully initialize cursor on shard " << shardId - << ", current connection state is " - << mdata.toBSON().toString(), + str::stream() + << "could not fully initialize cursor on shard " << shardId + << ", current connection state is " << mdata.toBSON().toString(), success); mdata.retryNext = false; @@ -991,8 +992,7 @@ void ParallelSortClusteredCursor::_oldInit(OperationContext* opCtx) { // Version is zero b/c this is deprecated codepath staleConfigExs.push_back(str::stream() << "stale config detected for " << _ns - << " in ParallelCursor::_init " - << errLoc); + << " in ParallelCursor::_init " << errLoc); break; } @@ -1054,8 +1054,8 @@ void ParallelSortClusteredCursor::_oldInit(OperationContext* opCtx) { _cursors[i].reset(NULL, NULL); if (!retry) { - socketExs.push_back(str::stream() << "error querying server: " - << servers[i]); + socketExs.push_back(str::stream() + << "error querying server: " << servers[i]); conns[i]->done(); } else { retryQueries.insert(i); @@ -1275,12 +1275,7 @@ void ParallelConnectionMetadata::cleanup(bool full) { BSONObj ParallelConnectionMetadata::toBSON() const { return BSON("state" << (pcState ? pcState->toBSON() : BSONObj()) << "retryNext" << retryNext - << "init" - << initialized - << "finish" - << finished - << "errored" - << errored); + << "init" << initialized << "finish" << finished << "errored" << errored); } std::string ParallelConnectionState::toString() const { |