[SERVER-52539] Specify input/output to createIndexes command in IDL Created: 02/Nov/20  Updated: 25/Oct/21  Resolved: 26/Jan/21

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

Type: Task Priority: Major - P3
Reporter: Samyukta Lanka Assignee: Sara Golemon
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-52549 Convert createIndexes command impleme... Closed
Duplicate
is duplicated by SERVER-52549 Convert createIndexes command impleme... Closed
Related
related to SERVER-54043 Complete TODO listed in SERVER-52539 Closed
related to SERVER-53765 Validate index entries at catalog layer Backlog
related to SERVER-58347 disallow dropDups field in createInde... Backlog
is related to SERVER-26287 createIndexes should confirm that ind... Closed
is related to SERVER-53739 Validate all createIndexes options Closed
is related to SERVER-39669 Support creating index builds with un... Closed
Sprint: Repl 2020-11-30, Repl 2020-12-14, Repl 2020-12-28, Repl 2021-01-11, Security 2021-01-25, Security 2021-02-08
Participants:
Linked BF Score: 17

 Description   

There is an IDL file that specifies the inputs for the createIndexes command. We should modify it to include updates we've made to IDL Command syntax, like adding apiVersion and defining the replyType.



 Comments   
Comment by Githook User [ 25/Jan/21 ]

Author:

{'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}

Message: SERVER-52539 Convert createIndexes command to TypedCommand
Branch: master
https://github.com/mongodb/mongo/commit/8d86a33ac0fb2decd8032b9d47f45bf0b388577d

Comment by Githook User [ 14/Jan/21 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-53739 Temporary code to validate all createIndexes options

Temporary fix to prevent createIndexes from creating invalid index catalog
entries, which would make listIndexes fail. The thorough fix will be in
SERVER-52539.
Branch: master
https://github.com/mongodb/mongo/commit/c8e3d8c339141e4799b2c3519b54eb79025dea3d

Comment by A. Jesse Jiryu Davis [ 13/Jan/21 ]

Not the second one, sorry. (Overzealous personal script.) I've deleted the second CR from this ticket. I did attribute the first CR and commit to this ticket deliberately.

Comment by Sara Golemon [ 13/Jan/21 ]

Do either of these commits belong on this ticket ID?

Comment by Ian Whalen (Inactive) [ 04/Jan/21 ]

Author:

{'username': u'evrg-bot-webhook', 'name': u'A. Jesse Jiryu Davis', 'email': u'jesse@mongodb.com'}

Message:SERVER-52539 Validate createIndexes "background" option

Although we now ignore this option, a non-bool-like value creates a catalog
entry that "listIndexes" cannot parse.
Branch:master
https://github.com/mongodb/mongo/commit/9537e7f9bd14ec7e097077b5a31e7a7db674114b

Comment by A. Jesse Jiryu Davis [ 23/Dec/20 ]

Be mindful of the ignoreUnknownIndexOptions option introduced in SERVER-39669.

Comment by A. Jesse Jiryu Davis [ 19/Dec/20 ]

Fix this invocation of createIndexes:

https://github.com/mongodb/mongo/blob/08c0ec18e804511b96746e87e160bb9c250e5f49/jstests/core/txns/commands_banning_txnnumber_outside_transactions.js#L31

Right now, the command fails due to its misuse of txnNumber, as expected, but once we convert it to IDL, it will fail earlier during parameter parsing.

Comment by A. Jesse Jiryu Davis [ 14/Dec/20 ]

Once we write the V1 definition for "createIndexes", write a script comparing its NewIndexSpec struct to the "listIndexes" ListIndexesReplyItem struct. They must be the same except all ListIndexesReplyItem fields are optional, and ListIndexesReplyItem also has fields "buildUUID" and "spec".

Comment by A. Jesse Jiryu Davis [ 10/Dec/20 ]

Let's consider carefully which options are unstable, e.g. coarsest/finestIndexLevel, dropDups, partialFilterExpression, background.

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