[DOCS-13846] Investigate changes in SERVER-26726: Check number of arguments for createIndex() and throw error if more than two arguments Created: 24/Aug/20  Updated: 13/Nov/23  Resolved: 20/Nov/20

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.7.0, 4.4.2, 4.2.10, 3.6.21, 4.0.21, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Dave Cuthbert (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-26726 Check number of arguments for createI... Closed
Participants:
Days since reply: 3 years, 2 weeks, 2 days ago
Epic Link: DOCSP-9747
Story Points: 5

 Description   

Description

Downstream Change Summary

Added validation of number of arguments for shell functions ensureIndex, createIndex and createIndexes. Arguments handling or functions behaviour is not changed.

Description of Linked Ticket

If a third argument is passed to the ensureIndex() with valid options, then the behavior is to ignore the third argument instead of an error. So for example, if I execute the following

db.myColl.ensureIndex( { my_date: 1}, {expireAfterSeconds: 2678400},{background: true, sparse: true } ) 

the third argument which is critical to the purpose of this index build is completely ignored and the index is built in the foreground with no sparse option. This can lead to catastrophic events if myColl is very large and foreground index was not a choice. Can this be fixed so a user is not punished for accidentally passing the critical options as a third argument in the index build? The version we tried this is 3.2.9

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



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

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13846 fix code-block indentation
Branch: v4.2.12
https://github.com/mongodb/docs/commit/f7379d34c2a6290aae20c9930445d2b0fa937978

Comment by Githook User [ 25/Jan/21 ]

Author:

{'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}

Message: DOCS-13846 error message for createIndex
Branch: v4.2.12
https://github.com/mongodb/docs/commit/6cc91018f64749e1abff13f575f99be696e76dda

Comment by Githook User [ 20/Nov/20 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13846 fix code-block indentation
Branch: v3.6
https://github.com/mongodb/docs/commit/53f51e0cff44e84c1b094e490e06d6607645786a

Comment by Githook User [ 20/Nov/20 ]

Author:

{'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}

Message: DOCS-13846 error message for createIndex
Branch: v3.6
https://github.com/mongodb/docs/commit/2479412fc93d50a980710524a8506df55e941c85

Comment by Githook User [ 20/Nov/20 ]

Author:

{'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}

Message: DOCS-13846 error message for createIndex
Branch: DOCS-13846-error-message-for-createIndex-v3.6.21
https://github.com/mongodb/docs/commit/bea20041d2deaf8c18f62f4fd59138fb830dbe58

Comment by Githook User [ 20/Nov/20 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13846 fix code-block indentation
Branch: v4.0
https://github.com/mongodb/docs/commit/d1de535ac17dcb247e9be429889d73d0f00bfba2

Comment by Githook User [ 20/Nov/20 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13846 fix code-block indentation
Branch: v4.2
https://github.com/mongodb/docs/commit/f7379d34c2a6290aae20c9930445d2b0fa937978

Comment by Githook User [ 20/Nov/20 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13846 fix code-block intendation
Branch: master
https://github.com/mongodb/docs/commit/e35007b0a447299a3bc7831cb9104d481f1dc133

Comment by Githook User [ 20/Nov/20 ]

Author:

{'name': 'Andrew Feierabend', 'email': 'andrew.feierabend@mongodb.com', 'username': 'andf-mongodb'}

Message: DOCS-13846 fix code-block intendation
Branch: v5.0
https://github.com/mongodb/docs/commit/bcba065a1ef8ceafa085552e6eaf6e81b5671111

Comment by Githook User [ 20/Nov/20 ]

Author:

{'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}

Message: DOCS-13846 error message for createIndex
Branch: v4.0
https://github.com/mongodb/docs/commit/820af688f0c3f5ee697edb24b8b7c225e99cc6ea

Comment by Githook User [ 20/Nov/20 ]

Author:

{'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}

Message: DOCS-13846 error message for createIndex
Branch: v4.2
https://github.com/mongodb/docs/commit/6cc91018f64749e1abff13f575f99be696e76dda

Comment by Githook User [ 19/Nov/20 ]

Author:

{'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}

Message: DOCS-13846 error message for createIndex
Branch: DOCS-13846-error-message-for-createIndex-v4.0.21
https://github.com/mongodb/docs/commit/4ebae2b371876d1d0b60b514f7031acb58710f54

Comment by Githook User [ 19/Nov/20 ]

Author:

{'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}

Message: DOCS-13846 error message for createIndex
Branch: DOCS-13846-error-message-for-createIndex-v4.2.10
https://github.com/mongodb/docs/commit/e9fa05d94c9020889f0bb489f6f9b3f45e243627

Comment by Githook User [ 19/Nov/20 ]

Author:

{'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}

Message: DOCS-13846 error message for createIndex
Branch: master
https://github.com/mongodb/docs/commit/372d0ee2745b1bea5cb7cdcf51f284c8d2648b1a

Comment by Githook User [ 19/Nov/20 ]

Author:

{'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}

Message: DOCS-13846 error message for createIndex
Branch: DOCS-13846-error-message-for-createIndex-v4.4.2
https://github.com/mongodb/docs/commit/e33a13e289dd1a09884de11d79da4721f97f0705

Comment by Githook User [ 17/Nov/20 ]

Author:

{'name': 'Dave Cuthbert', 'email': 'dave.cuthbert@mongodb.com', 'username': 'davemungo'}

Message: DOCS-13846 error message for createIndex
Branch: v5.0
https://github.com/mongodb/docs/commit/e8e9413baad9310728458c61b6a9d466ad3a5a4c

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