[SERVER-68769] If a shard key index cannot be dropped then a user should not be able to hide that index Created: 12/Aug/22  Updated: 29/Oct/23  Resolved: 11/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.1, 6.0.4, 6.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Garaudy Etienne Assignee: Pol Pinol
Resolution: Fixed Votes: 0
Labels: shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Documented
is documented by DOCS-15731 [Server] Investigate changes in SERVE... Closed
Problem/Incident
causes SERVER-74841 collMod should not call catalogClient... Closed
Related
related to SERVER-67071 Sharding should not use hidden indexes Closed
related to SERVER-74841 collMod should not call catalogClient... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.1, v6.0, v5.0, v4.4
Sprint: Sharding EMEA 2022-10-31, Sharding EMEA 2022-11-14
Participants:
Linked BF Score: 135
Story Points: 3

 Description   

A hidden index helps users evaluate the potential impact of dropping an index without actually dropping the index. That way, the user can just unhide the index if the impact is bad. Hidden and dropped indexes should therefore have the same behavior.

For sharding, however, we allow a shard key index that cannot be dropped to be hidden. In order to maintain consistency, we should not allow users to hide a shard key index that cannot be dropped.



 Comments   
Comment by Garaudy Etienne [ 17/Nov/22 ]

renato.riccio@mongodb.com

Comment by Githook User [ 17/Nov/22 ]

Author:

{'name': 'Pol PiƱol Castuera', 'email': '67922619+PolPinol@users.noreply.github.com', 'username': 'PolPinol'}

Message: SERVER-68769 If the shard key index cannot be dropped, it cannot be hidden.
Branch: v6.0
https://github.com/mongodb/mongo/commit/841b110f721d836fc97ca9d26424038a8268564d

Comment by Githook User [ 15/Nov/22 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-68769 If the shard key index cannot be dropped, it cannot be hidden.
Branch: v6.1
https://github.com/mongodb/mongo/commit/8e22d0a400e73070f752ce74bd60f99ec2997746

Comment by Tommaso Tocci [ 11/Nov/22 ]

garaudy.etienne@mongodb.com before 6.0 SERVER-6491 there is nothing that prevent dropping the last index on the shard key. So I don't think we can backport this behind 6.0 if we don't also backport SERVER-6491.

For the moment I will approve 6.1 and 6.0.

Comment by Garaudy Etienne [ 11/Nov/22 ]

Are there backport tickets for this? sergi.mateo-bellido@mongodb.com tommaso.tocci@mongodb.com

Comment by Githook User [ 11/Nov/22 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-68769 If the shard key index cannot be dropped, it cannot be hidden.
Branch: master
https://github.com/mongodb/mongo/commit/dd6c21b4f7c6d32161a0c262dbd63a8c86b2a44d

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