diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2023-04-14 13:40:59 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-04-14 17:52:19 +0000 |
commit | bf357fbf76d28bfbdecb5a10ab8a87c5f1a37b8d (patch) | |
tree | e02685e4a802e7627b7a61e6d74cf2003b3d9b1a | |
parent | e9d67b4373b09e2d4f5820ee956c21c4150cf27f (diff) | |
download | mongo-bf357fbf76d28bfbdecb5a10ab8a87c5f1a37b8d.tar.gz |
SERVER-76077 Allow server to startup with 'bucketSize' field in index spec
(cherry picked from commit 5488f63526dc5acd9ef4b061074dc46ecf7d45de)
-rw-r--r-- | src/mongo/db/catalog/index_key_validate.h | 7 |
1 files changed, 6 insertions, 1 deletions
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<StringData> 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 |