[SERVER-60265] Disallow specific fields from clustered collection creation Created: 27/Sep/21  Updated: 29/Oct/23  Resolved: 13/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0

Type: Task Priority: Major - P3
Reporter: Haley Connelly Assignee: Josef Ahmad
Resolution: Fixed Votes: 0
Labels: PM-2311-M1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-10-18
Participants:
Story Points: 1

 Description   

One example is viewOn doesn't make sense when creating a clustered collection.

Investigate which fields to allow with clustered collection creation and which conflict. Ensure the restrictions are enforced.



 Comments   
Comment by Githook User [ 13/Oct/21 ]

Author:

{'name': 'Josef Ahmad', 'email': 'josef.ahmad@mongodb.com', 'username': 'josefahmad'}

Message: SERVER-60265 disallow clustered coll creation with views and autoIndexId
Branch: master
https://github.com/mongodb/mongo/commit/00aa2ae281ba22b06df9e710bfd3046a6b9ddc24

Comment by Josef Ahmad [ 12/Oct/21 ]

Thanks Haley. As this ticket validates collection creation, let's defer the createIndex validation you propose to its dedicated ticket SERVER-60124.

Comment by Haley Connelly [ 05/Oct/21 ]

A test should be included that also confirms it is illegal to create an index identical to the clusterKey

eg) assert.commandFailedWithCode(db[collName].createIndex({_id: 1}), ErrorCodes.IndexAlreadyExists);

Generated at Thu Feb 08 05:49:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.