From bf357fbf76d28bfbdecb5a10ab8a87c5f1a37b8d Mon Sep 17 00:00:00 2001 From: Henrik Edin Date: Fri, 14 Apr 2023 13:40:59 +0000 Subject: SERVER-76077 Allow server to startup with 'bucketSize' field in index spec (cherry picked from commit 5488f63526dc5acd9ef4b061074dc46ecf7d45de) --- src/mongo/db/catalog/index_key_validate.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mongo/db/catalog/index_key_validate.h b/src/mongo/db/catalog/index_key_validate.h index af819f4286a..178c82a4642 100644 --- a/src/mongo/db/catalog/index_key_validate.h +++ b/src/mongo/db/catalog/index_key_validate.h @@ -77,7 +77,12 @@ static std::set allowedFieldNames = { IndexDescriptor::kOriginalSpecFieldName, IndexDescriptor::kPrepareUniqueFieldName, // Index creation under legacy writeMode can result in an index spec with an _id field. - "_id"}; + "_id", + // TODO SERVER-76108: Field names are not validated to match index type. This was used for the + // removed 'geoHaystack' index type, but users could have set it for other index types as well. + // We need to keep allowing it until FCV upgrade is implemented to clean this up. + "bucketSize"_sd, +}; /** * Checks if the key is valid for building an index according to the validation rules for the given -- cgit v1.2.1