summaryrefslogtreecommitdiff
path: root/src/mongo/db/query
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query')
-rw-r--r--src/mongo/db/query/datetime/date_time_support.h2
-rw-r--r--src/mongo/db/query/find.cpp2
-rw-r--r--src/mongo/db/query/index_bounds_builder.cpp2
-rw-r--r--src/mongo/db/query/index_bounds_test.cpp2
-rw-r--r--src/mongo/db/query/plan_cache.cpp4
-rw-r--r--src/mongo/db/query/plan_enumerator.cpp2
-rw-r--r--src/mongo/db/query/planner_access.cpp2
-rw-r--r--src/mongo/db/query/planner_ixselect.cpp2
-rw-r--r--src/mongo/db/query/query_planner_common.cpp2
9 files changed, 10 insertions, 10 deletions
diff --git a/src/mongo/db/query/datetime/date_time_support.h b/src/mongo/db/query/datetime/date_time_support.h
index c2246fd74b6..51e299336f9 100644
--- a/src/mongo/db/query/datetime/date_time_support.h
+++ b/src/mongo/db/query/datetime/date_time_support.h
@@ -269,7 +269,7 @@ public:
break;
default:
// Should never happen as format is pre-validated
- invariant(false);
+ MONGO_UNREACHABLE;
}
}
}
diff --git a/src/mongo/db/query/find.cpp b/src/mongo/db/query/find.cpp
index ebe4c2937c3..ba2df28842a 100644
--- a/src/mongo/db/query/find.cpp
+++ b/src/mongo/db/query/find.cpp
@@ -228,7 +228,7 @@ Message getMore(OperationContext* opCtx,
// For testing, we may want to fail if we receive a getmore.
if (MONGO_FAIL_POINT(failReceivedGetmore)) {
- invariant(0);
+ MONGO_UNREACHABLE;
}
*exhaust = false;
diff --git a/src/mongo/db/query/index_bounds_builder.cpp b/src/mongo/db/query/index_bounds_builder.cpp
index aa91b2c35a2..fb9425b5fdb 100644
--- a/src/mongo/db/query/index_bounds_builder.cpp
+++ b/src/mongo/db/query/index_bounds_builder.cpp
@@ -958,7 +958,7 @@ void IndexBoundsBuilder::alignBounds(IndexBounds* bounds, const BSONObj& kp, int
log() << "INVALID BOUNDS: " << redact(bounds->toString()) << endl
<< "kp = " << redact(kp) << endl
<< "scanDir = " << scanDir;
- invariant(0);
+ MONGO_UNREACHABLE;
}
}
diff --git a/src/mongo/db/query/index_bounds_test.cpp b/src/mongo/db/query/index_bounds_test.cpp
index 1fca089e584..72343489928 100644
--- a/src/mongo/db/query/index_bounds_test.cpp
+++ b/src/mongo/db/query/index_bounds_test.cpp
@@ -856,7 +856,7 @@ std::string toString(IndexBoundsChecker::Location location) {
case IndexBoundsChecker::AHEAD:
return "AHEAD";
}
- invariant(0);
+ MONGO_UNREACHABLE;
}
/**
diff --git a/src/mongo/db/query/plan_cache.cpp b/src/mongo/db/query/plan_cache.cpp
index 0d501a8212d..e530f18af59 100644
--- a/src/mongo/db/query/plan_cache.cpp
+++ b/src/mongo/db/query/plan_cache.cpp
@@ -273,7 +273,7 @@ void encodeGeoMatchExpression(const GeoMatchExpression* tree, StringBuilder* key
} else {
error() << "unknown CRS type " << (int)geoQuery.getGeometry().getNativeCRS()
<< " in geometry of type " << geoQuery.getGeometry().getDebugType();
- invariant(false);
+ MONGO_UNREACHABLE;
}
}
@@ -303,7 +303,7 @@ void encodeGeoNearMatchExpression(const GeoNearMatchExpression* tree, StringBuil
case UNSET:
error() << "unknown CRS type " << (int)nearQuery.centroid->crs
<< " in point geometry for near query";
- invariant(false);
+ MONGO_UNREACHABLE;
break;
}
}
diff --git a/src/mongo/db/query/plan_enumerator.cpp b/src/mongo/db/query/plan_enumerator.cpp
index 3b6f4a0f164..11d241426ab 100644
--- a/src/mongo/db/query/plan_enumerator.cpp
+++ b/src/mongo/db/query/plan_enumerator.cpp
@@ -341,7 +341,7 @@ PlanEnumerator::MemoID PlanEnumerator::memoIDForNode(MatchExpression* node) {
if (_nodeToId.end() == it) {
error() << "Trying to look up memo entry for node, none found.";
- invariant(0);
+ MONGO_UNREACHABLE;
}
return it->second;
diff --git a/src/mongo/db/query/planner_access.cpp b/src/mongo/db/query/planner_access.cpp
index ac1ecae8127..82d40993aea 100644
--- a/src/mongo/db/query/planner_access.cpp
+++ b/src/mongo/db/query/planner_access.cpp
@@ -1336,7 +1336,7 @@ void QueryPlannerAccess::handleFilter(ScanBuildingState* scanState) {
handleFilterAnd(scanState);
} else {
// We must be building leaves for either and AND or an OR.
- invariant(0);
+ MONGO_UNREACHABLE;
}
}
diff --git a/src/mongo/db/query/planner_ixselect.cpp b/src/mongo/db/query/planner_ixselect.cpp
index c63f41747a9..5f92f12b88c 100644
--- a/src/mongo/db/query/planner_ixselect.cpp
+++ b/src/mongo/db/query/planner_ixselect.cpp
@@ -323,7 +323,7 @@ bool QueryPlannerIXSelect::compatible(const BSONElement& elt,
// NOTE: This shouldn't be reached. Text index implies there is a separator implies we
// will always hit the 'return true' above.
- invariant(0);
+ MONGO_UNREACHABLE;
return true;
} else if (IndexNames::HASHED == indexedFieldType) {
if (ComparisonMatchExpressionBase::isEquality(exprtype)) {
diff --git a/src/mongo/db/query/query_planner_common.cpp b/src/mongo/db/query/query_planner_common.cpp
index 33eb72100cc..e9eb4a6c094 100644
--- a/src/mongo/db/query/query_planner_common.cpp
+++ b/src/mongo/db/query/query_planner_common.cpp
@@ -72,7 +72,7 @@ void QueryPlannerCommon::reverseScans(QuerySolutionNode* node) {
if (!isn->bounds.isValidFor(isn->index.keyPattern, isn->direction)) {
LOG(5) << "Invalid bounds: " << redact(isn->bounds.toString());
- invariant(0);
+ MONGO_UNREACHABLE;
}
// TODO: we can just negate every value in the already computed properties.