[SERVER-64928] Disallow createIndexes with clustered:false Created: 25/Mar/22  Updated: 29/Oct/23  Resolved: 05/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Haley Connelly Assignee: Yujin Kang Park
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-67800 [6.0] Exclude clustered_collection_*.... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-04-04, Execution Team 2022-04-18
Participants:

 Description   

Specifying 'clustered': false blocks an index from being created but returns IndexAlreadyExists

db.runCommand({"createIndexes":"undefined","indexes":[{"key":{"somedata":1},"name":"s2","clustered":false,"unique":true}]})
{
	"numIndexesBefore" : 3,
	"numIndexesAfter" : 3,
	"note" : "all indexes already exist",
	"ok" : 1
}



 Comments   
Comment by Githook User [ 05/Apr/22 ]

Author:

{'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'ykangpark'}

Message: SERVER-64928 Disallow createIndexes with clustered:false
Branch: master
https://github.com/mongodb/mongo/commit/a91436f2dff19f1ea7cc69bb00531f9bcaaaa681

Comment by Louis Williams [ 25/Mar/22 ]

Yeah, I think so. It doesn't really serve a purpose.

Comment by Haley Connelly [ 25/Mar/22 ]

Because it isn't trying to do anything illegal. Should we change this ticket to disallow 'clustered': false?

 

Comment by Louis Williams [ 25/Mar/22 ]

I think we should just return an error, why do we want this to create the index?

Generated at Thu Feb 08 06:01:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.