[SERVER-59805] Provide a way to check for and to remove invalid index catalog options Created: 06/Sep/21  Updated: 29/Oct/23  Resolved: 24/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.4, 5.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Spencer Brown Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Documented
is documented by DOCS-14821 Investigate changes in SERVER-59805: ... Closed
Related
related to SERVER-64444 listIndexes fails on invalid pre-5.0 ... Closed
is related to SERVER-65549 Fix invalid index options when upgrad... Closed
is related to SERVER-65797 Remove invalid index specs in memory ... Closed
is related to SERVER-76109 Allow --repair to startup a server wi... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Execution Team 2021-10-04
Participants:
Case:

 Description   

Invalid index options such as "safe" may have been created in the past, before the createIndexes command started validating options more strictly.

In MongoDB 5.0, the listIndexes command more strictly validates index options, and fails when an invalid option is encountered. At this point, the only option is to drop and recreate the index.

This feature request is for the validate command to remove these invalid options as it is validating an index. This would provide a much faster way than recreating the index when fixing an invalid index option.



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

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-59805 Reference 'collMod' in 'validate' to remove invalid index options

(cherry picked from commit ad37caab15ec83eca73286708534cfed744215e7)
Branch: v5.0
https://github.com/mongodb/mongo/commit/d3d314b2a872487ec10f9d5a7d246bfa09470992

Comment by Githook User [ 04/Oct/21 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-59805 The 'collMod' command removes invalid index options

(cherry picked from commit 478046e5deec8eed9583fb2ffeffd8dbef7c73b2)
Branch: v5.0
https://github.com/mongodb/mongo/commit/3506007d576de2a9654bbcbcdfaf9632f310410b

Comment by Githook User [ 04/Oct/21 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-59805 The 'validate' command detects invalid index options

(cherry picked from commit 9b1fb88612df927d1b01f645bb07892858d07ce9)
Branch: v5.0
https://github.com/mongodb/mongo/commit/16bacd0df9996ed4eb6f7d6d001c06d24e877bd6

Comment by Githook User [ 24/Sep/21 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-59805 Reference 'collMod' in 'validate' to remove invalid index options
Branch: master
https://github.com/mongodb/mongo/commit/ad37caab15ec83eca73286708534cfed744215e7

Comment by Githook User [ 24/Sep/21 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-59805 The 'collMod' command removes invalid index options
Branch: master
https://github.com/mongodb/mongo/commit/478046e5deec8eed9583fb2ffeffd8dbef7c73b2

Comment by Githook User [ 24/Sep/21 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-59805 The 'validate' command detects invalid index options
Branch: master
https://github.com/mongodb/mongo/commit/9b1fb88612df927d1b01f645bb07892858d07ce9

Comment by Connie Chen [ 09/Sep/21 ]

We have to not require validate in order to do list indexes when invalid options are present. 

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