summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec')
-rw-r--r--src/mongo/db/exec/and_sorted.cpp2
-rw-r--r--src/mongo/db/exec/change_stream_proxy.cpp3
-rw-r--r--src/mongo/db/exec/collection_scan.cpp6
-rw-r--r--src/mongo/db/exec/count_scan.cpp2
-rw-r--r--src/mongo/db/exec/geo_near.cpp18
-rw-r--r--src/mongo/db/exec/queued_data_stage_test.cpp2
-rw-r--r--src/mongo/db/exec/record_store_fast_count.h2
-rw-r--r--src/mongo/db/exec/requires_collection_stage.cpp3
-rw-r--r--src/mongo/db/exec/stagedebug_cmd.cpp10
-rw-r--r--src/mongo/db/exec/text_or.cpp2
-rw-r--r--src/mongo/db/exec/update_stage.cpp3
-rw-r--r--src/mongo/db/exec/write_stage_common.h4
12 files changed, 25 insertions, 32 deletions
diff --git a/src/mongo/db/exec/and_sorted.cpp b/src/mongo/db/exec/and_sorted.cpp
index cdb095ba08d..7904915ebe7 100644
--- a/src/mongo/db/exec/and_sorted.cpp
+++ b/src/mongo/db/exec/and_sorted.cpp
@@ -37,8 +37,8 @@
namespace mongo {
-using std::unique_ptr;
using std::numeric_limits;
+using std::unique_ptr;
using std::vector;
using stdx::make_unique;
diff --git a/src/mongo/db/exec/change_stream_proxy.cpp b/src/mongo/db/exec/change_stream_proxy.cpp
index 7750beeaf86..0de28de0b55 100644
--- a/src/mongo/db/exec/change_stream_proxy.cpp
+++ b/src/mongo/db/exec/change_stream_proxy.cpp
@@ -94,8 +94,7 @@ BSONObj ChangeStreamProxyStage::_validateAndConvertToBSON(const Document& event)
"event makes it impossible to resume the stream from that point. Only "
"transformations that retain the unmodified _id field are allowed. "
"Expected: "
- << BSON("_id" << resumeToken)
- << " but found: "
+ << BSON("_id" << resumeToken) << " but found: "
<< (eventBSON["_id"] ? BSON("_id" << eventBSON["_id"]) : BSONObj()),
idField.binaryEqual(resumeToken));
return eventBSON;
diff --git a/src/mongo/db/exec/collection_scan.cpp b/src/mongo/db/exec/collection_scan.cpp
index fb77bc01965..0b3f9b1c23c 100644
--- a/src/mongo/db/exec/collection_scan.cpp
+++ b/src/mongo/db/exec/collection_scan.cpp
@@ -118,8 +118,7 @@ PlanStage::StageState CollectionScan::doWork(WorkingSetID* out) {
Status status(ErrorCodes::CappedPositionLost,
str::stream() << "CollectionScan died due to failure to restore "
<< "tailable cursor position. "
- << "Last seen record id: "
- << _lastSeenId);
+ << "Last seen record id: " << _lastSeenId);
*out = WorkingSetCommon::allocateStatusMember(_workingSet, status);
return PlanStage::FAILURE;
}
@@ -222,8 +221,7 @@ void CollectionScan::doRestoreStateRequiresCollection() {
uassert(ErrorCodes::CappedPositionLost,
str::stream()
<< "CollectionScan died due to position in capped collection being deleted. "
- << "Last seen record id: "
- << _lastSeenId,
+ << "Last seen record id: " << _lastSeenId,
couldRestore);
}
}
diff --git a/src/mongo/db/exec/count_scan.cpp b/src/mongo/db/exec/count_scan.cpp
index ce19790ef19..66fabdc964c 100644
--- a/src/mongo/db/exec/count_scan.cpp
+++ b/src/mongo/db/exec/count_scan.cpp
@@ -61,7 +61,7 @@ BSONObj replaceBSONFieldNames(const BSONObj& replace, const BSONObj& fieldNames)
return bob.obj();
}
-}
+} // namespace
using std::unique_ptr;
using std::vector;
diff --git a/src/mongo/db/exec/geo_near.cpp b/src/mongo/db/exec/geo_near.cpp
index 72ffe359813..32c9294cdce 100644
--- a/src/mongo/db/exec/geo_near.cpp
+++ b/src/mongo/db/exec/geo_near.cpp
@@ -96,7 +96,7 @@ struct StoredGeometry {
BSONElement element;
GeometryContainer geometry;
};
-}
+} // namespace
/**
* Find and parse all geometry elements on the appropriate field path from the document.
@@ -556,7 +556,7 @@ private:
// Owns matcher
const unique_ptr<MatchExpression> _matcher;
};
-}
+} // namespace
static double min2DBoundsIncrement(const GeoNearExpression& query,
const IndexDescriptor* twoDIndex) {
@@ -591,9 +591,9 @@ static R2Annulus projectBoundsToTwoDDegrees(R2Annulus sphereBounds) {
}
StatusWith<NearStage::CoveredInterval*> //
- GeoNear2DStage::nextInterval(OperationContext* opCtx,
- WorkingSet* workingSet,
- const Collection* collection) {
+GeoNear2DStage::nextInterval(OperationContext* opCtx,
+ WorkingSet* workingSet,
+ const Collection* collection) {
// The search is finished if we searched at least once and all the way to the edge
if (_currBounds.getInner() >= 0 && _currBounds.getOuter() == _fullBounds.getOuter()) {
return StatusWith<CoveredInterval*>(NULL);
@@ -830,7 +830,7 @@ S2Region* buildS2Region(const R2Annulus& sphereBounds) {
// Takes ownership of caps
return new S2RegionIntersection(&regions);
}
-}
+} // namespace
// Estimate the density of data by search the nearest cells level by level around center.
class GeoNear2DSphereStage::DensityEstimator {
@@ -1011,9 +1011,9 @@ PlanStage::StageState GeoNear2DSphereStage::initialize(OperationContext* opCtx,
}
StatusWith<NearStage::CoveredInterval*> //
- GeoNear2DSphereStage::nextInterval(OperationContext* opCtx,
- WorkingSet* workingSet,
- const Collection* collection) {
+GeoNear2DSphereStage::nextInterval(OperationContext* opCtx,
+ WorkingSet* workingSet,
+ const Collection* collection) {
// The search is finished if we searched at least once and all the way to the edge
if (_currBounds.getInner() >= 0 && _currBounds.getOuter() == _fullBounds.getOuter()) {
return StatusWith<CoveredInterval*>(NULL);
diff --git a/src/mongo/db/exec/queued_data_stage_test.cpp b/src/mongo/db/exec/queued_data_stage_test.cpp
index 257423679a7..d441954f8f6 100644
--- a/src/mongo/db/exec/queued_data_stage_test.cpp
+++ b/src/mongo/db/exec/queued_data_stage_test.cpp
@@ -124,4 +124,4 @@ TEST_F(QueuedDataStageTest, validateStats) {
unique_ptr<PlanStageStats> allStats(mock->getStats());
ASSERT_TRUE(stats->isEOF);
}
-}
+} // namespace
diff --git a/src/mongo/db/exec/record_store_fast_count.h b/src/mongo/db/exec/record_store_fast_count.h
index ab601569cd4..973165969be 100644
--- a/src/mongo/db/exec/record_store_fast_count.h
+++ b/src/mongo/db/exec/record_store_fast_count.h
@@ -75,4 +75,4 @@ private:
CountStats _specificStats;
};
-} // namepace mongo
+} // namespace mongo
diff --git a/src/mongo/db/exec/requires_collection_stage.cpp b/src/mongo/db/exec/requires_collection_stage.cpp
index 3d77b61870a..060722dbe14 100644
--- a/src/mongo/db/exec/requires_collection_stage.cpp
+++ b/src/mongo/db/exec/requires_collection_stage.cpp
@@ -61,8 +61,7 @@ void RequiresCollectionStageBase<CollectionT>::doRestoreState() {
// a rename has happened during yield.
uassert(ErrorCodes::QueryPlanKilled,
str::stream() << "collection renamed from '" << _nss << "' to '" << *newNss
- << "'. UUID "
- << _collectionUUID,
+ << "'. UUID " << _collectionUUID,
*newNss == _nss);
// At this point we know that the collection name has not changed, and therefore we have
diff --git a/src/mongo/db/exec/stagedebug_cmd.cpp b/src/mongo/db/exec/stagedebug_cmd.cpp
index c313f3b592d..687abb12964 100644
--- a/src/mongo/db/exec/stagedebug_cmd.cpp
+++ b/src/mongo/db/exec/stagedebug_cmd.cpp
@@ -65,8 +65,8 @@
namespace mongo {
-using std::unique_ptr;
using std::string;
+using std::unique_ptr;
using std::vector;
using stdx::make_unique;
@@ -283,11 +283,9 @@ public:
str::stream() << "Can't find index: " << keyPatternObj,
!indexes.empty());
uassert(ErrorCodes::AmbiguousIndexKeyPattern,
- str::stream() << indexes.size() << " matching indexes for key pattern: "
- << keyPatternObj
- << ". Conflicting indexes: "
- << indexes[0]->infoObj()
- << ", "
+ str::stream() << indexes.size()
+ << " matching indexes for key pattern: " << keyPatternObj
+ << ". Conflicting indexes: " << indexes[0]->infoObj() << ", "
<< indexes[1]->infoObj(),
indexes.size() == 1);
desc = indexes[0];
diff --git a/src/mongo/db/exec/text_or.cpp b/src/mongo/db/exec/text_or.cpp
index 52fc60a53a1..eef2993d7e2 100644
--- a/src/mongo/db/exec/text_or.cpp
+++ b/src/mongo/db/exec/text_or.cpp
@@ -45,9 +45,9 @@
namespace mongo {
+using std::string;
using std::unique_ptr;
using std::vector;
-using std::string;
using stdx::make_unique;
using fts::FTSSpec;
diff --git a/src/mongo/db/exec/update_stage.cpp b/src/mongo/db/exec/update_stage.cpp
index d77676122a8..a7b307bf49c 100644
--- a/src/mongo/db/exec/update_stage.cpp
+++ b/src/mongo/db/exec/update_stage.cpp
@@ -116,8 +116,7 @@ void assertRequiredPathsPresent(const mb::Document& document, const FieldRefSet&
uassert(ErrorCodes::NoSuchKey,
str::stream() << "After applying the update, the new document was missing the "
"required field '"
- << (*path).dottedField()
- << "'",
+ << (*path).dottedField() << "'",
elem.ok());
uassert(
ErrorCodes::NotSingleValueField,
diff --git a/src/mongo/db/exec/write_stage_common.h b/src/mongo/db/exec/write_stage_common.h
index 2f59e755c7a..1d3934443e6 100644
--- a/src/mongo/db/exec/write_stage_common.h
+++ b/src/mongo/db/exec/write_stage_common.h
@@ -54,5 +54,5 @@ bool ensureStillMatches(const Collection* collection,
WorkingSet* ws,
WorkingSetID id,
const CanonicalQuery* cq);
-}
-}
+} // namespace write_stage_common
+} // namespace mongo