diff options
author | Louis Williams <louis.williams@mongodb.com> | 2021-03-04 10:38:32 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-04 18:47:07 +0000 |
commit | ad77d6846c1104b282cbfdad426f68ca86b673ad (patch) | |
tree | 2620a72330a697e6aff18bbd63982dc42bd38c62 /src/mongo/db/commands/create_indexes.cpp | |
parent | 0d8114dacb5a2e19d6208ae4770a3b3d2864662d (diff) | |
download | mongo-ad77d6846c1104b282cbfdad426f68ca86b673ad.tar.gz |
SERVER-54917 Error messages that prohibit index types should be based on whether or not the collection is clustered by _id
Diffstat (limited to 'src/mongo/db/commands/create_indexes.cpp')
-rw-r--r-- | src/mongo/db/commands/create_indexes.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/mongo/db/commands/create_indexes.cpp b/src/mongo/db/commands/create_indexes.cpp index 46ee2141acd..500d0e252d5 100644 --- a/src/mongo/db/commands/create_indexes.cpp +++ b/src/mongo/db/commands/create_indexes.cpp @@ -140,22 +140,6 @@ std::vector<BSONObj> parseAndValidateIndexSpecs(OperationContext* opCtx, !ns.isSystem() || indexSpec[IndexDescriptor::kHiddenFieldName].eoo()); } - // TODO(SERVER-54917): Check for clustered index instead of inspecting namespace. - uassert(ErrorCodes::InvalidOptions, - "Partial indexes are not supported on time-series buckets collections", - !ns.isTimeseriesBucketsCollection() || - !indexSpec[IndexDescriptor::kPartialFilterExprFieldName]); - - uassert(ErrorCodes::InvalidOptions, - "Unique indexes are not supported on time-series buckets collections", - !ns.isTimeseriesBucketsCollection() || - !indexSpec[IndexDescriptor::kUniqueFieldName].trueValue()); - - uassert(ErrorCodes::InvalidOptions, - "TTL indexes are not supported on time-series buckets collections", - !ns.isTimeseriesBucketsCollection() || - !indexSpec[IndexDescriptor::kExpireAfterSecondsFieldName]); - indexSpecs.push_back(std::move(indexSpec)); } |