summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Larkin-York <dan.larkin-york@mongodb.com>2021-12-21 00:32:06 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-12-21 01:05:10 +0000
commit6fd04b0bdf70b659f8db6c4dfe62cb3d418178bb (patch)
tree260c37d0b8678de439942b61db910c5e363d2221
parent3130c8146113e2c2efb4615cf93630f42fd9f1bf (diff)
downloadmongo-6fd04b0bdf70b659f8db6c4dfe62cb3d418178bb.tar.gz
SERVER-62169 ViewCatalog::resolveView should handle when time-series bucket collection does not exist
-rw-r--r--src/mongo/db/views/view_catalog.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/views/view_catalog.cpp b/src/mongo/db/views/view_catalog.cpp
index b043eb5a03d..57697266e3a 100644
--- a/src/mongo/db/views/view_catalog.cpp
+++ b/src/mongo/db/views/view_catalog.cpp
@@ -771,14 +771,13 @@ StatusWith<ResolvedView> ViewCatalog::resolveView(
if (view->timeseries()) {
auto tsCollection =
CollectionCatalog::get(opCtx)->lookupCollectionByNamespace(opCtx, *resolvedNss);
- tassert(6067201,
+ uassert(6067201,
str::stream() << "expected time-series buckets collection " << *resolvedNss
<< " to exist",
-
tsCollection);
- mixedData = tsCollection
- ? tsCollection->getTimeseriesBucketsMayHaveMixedSchemaData()
- : false;
+ if (tsCollection) {
+ mixedData = tsCollection->getTimeseriesBucketsMayHaveMixedSchemaData();
+ }
}
dependencyChain.push_back(*resolvedNss);