From 53f70ee33c84c1367e5b05bc51fef12ab3ad5c73 Mon Sep 17 00:00:00 2001 From: Dan Larkin-York Date: Wed, 15 Sep 2021 21:31:43 +0000 Subject: SERVER-59305 Reject timeseries measurements with array values in indexed fields --- src/mongo/db/index/btree_access_method.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mongo/db/index/btree_access_method.cpp') diff --git a/src/mongo/db/index/btree_access_method.cpp b/src/mongo/db/index/btree_access_method.cpp index c35928b7901..df3500ceb8f 100644 --- a/src/mongo/db/index/btree_access_method.cpp +++ b/src/mongo/db/index/btree_access_method.cpp @@ -34,6 +34,7 @@ #include "mongo/base/status.h" #include "mongo/base/status_with.h" #include "mongo/db/catalog/index_catalog_entry.h" +#include "mongo/db/index/expression_keys_private.h" #include "mongo/db/jsobj.h" #include "mongo/db/keypattern.h" @@ -65,6 +66,12 @@ BtreeAccessMethod::BtreeAccessMethod(IndexCatalogEntry* btreeState, getSortedDataInterface()->getOrdering()); } +void BtreeAccessMethod::validateDocument(const CollectionPtr& collection, + const BSONObj& obj, + const BSONObj& keyPattern) const { + ExpressionKeysPrivate::validateDocumentCommon(collection, obj, keyPattern); +} + void BtreeAccessMethod::doGetKeys(OperationContext* opCtx, const CollectionPtr& collection, SharedBufferFragmentBuilder& pooledBufferBuilder, -- cgit v1.2.1