summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2023-04-14 13:40:59 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-04-14 17:52:19 +0000
commitbf357fbf76d28bfbdecb5a10ab8a87c5f1a37b8d (patch)
treee02685e4a802e7627b7a61e6d74cf2003b3d9b1a
parente9d67b4373b09e2d4f5820ee956c21c4150cf27f (diff)
downloadmongo-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.h7
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