diff options
Diffstat (limited to 'src/mongo/db/commands/write_commands.cpp')
-rw-r--r-- | src/mongo/db/commands/write_commands.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/commands/write_commands.cpp b/src/mongo/db/commands/write_commands.cpp index 15dfa5a7b4c..f1068f91a34 100644 --- a/src/mongo/db/commands/write_commands.cpp +++ b/src/mongo/db/commands/write_commands.cpp @@ -146,9 +146,8 @@ bool isTimeseries(OperationContext* opCtx, const Request& request) { // collection does not yet exist, this check may return false unnecessarily. As a result, an // insert attempt into the time-series namespace will either succeed or fail, depending on who // wins the race. - return CollectionCatalog::get(opCtx) - ->lookupCollectionByNamespaceForRead(opCtx, bucketNss) - .get(); + auto coll = CollectionCatalog::get(opCtx)->lookupCollectionByNamespaceForRead(opCtx, bucketNss); + return (coll && coll->getTimeseriesOptions()); } NamespaceString makeTimeseriesBucketsNamespace(const NamespaceString& nss) { |