[DOCS-12150] 3.4 Compatibility Notes has an example of a command that doesn't work, but it does Created: 18/Oct/18  Updated: 30/Oct/23  Resolved: 18/Oct/18

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Major - P3
Reporter: Joanna Cheng Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to DOCS-10822 Typo "caped" instead of "capped" Closed
Participants:
Days since reply: 5 years, 17 weeks ago
Epic Link: DOCSP-1769

 Description   

Description

https://docs.mongodb.com/manual/release-notes/3.4-compatibility/#stricter-validation-of-collection-and-index-specifications says
> For example, the following operation is no longer valid:

db.createCollection( "myCappedCollection", { capped: true,  size: 5242880 } )

However, this command works fine on my 3.4.16 node

$ mongo --port 27018
MongoDB shell version v3.4.16
connecting to: mongodb://127.0.0.1:27018/
MongoDB server version: 3.4.16
Server has startup warnings:
2018-10-16T16:46:43.648+1100 I CONTROL  [initandlisten]
2018-10-16T16:46:43.648+1100 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-10-16T16:46:43.648+1100 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2018-10-16T16:46:43.648+1100 I CONTROL  [initandlisten]
shard01:PRIMARY> db.createCollection( "myCappedCollection", { capped: true,  size: 5242880 } )
{ "ok" : 1 }

It also matches the spec in the same docs https://docs.mongodb.com/manual/reference/method/db.createCollection/#db.createCollection

Can we change this example in the docs? It's not clear if there's something specific we want to demonstrate, but you have to specify valid options, so this no longer works:

db.createCollection( "myCappedCollection", { customoption: true} )

Scope of changes

Impact to Other Docs

MVP (Work and Date)

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



 Comments   
Comment by Kay Kim (Inactive) [ 18/Oct/18 ]

Will publish tomorrow morning.

Comment by Githook User [ 18/Oct/18 ]

Author:

{'name': 'kay', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}

Message: DOCS-12150: 3.4-compat createCollection show invalid option
Branch: master
https://github.com/mongodb/docs/commit/21eb7905cce4531256b7c72a114c6b3f938de09c

Comment by Githook User [ 18/Oct/18 ]

Author:

{'name': 'kay', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}

Message: DOCS-12150: 3.4-compat createCollection show invalid option
Branch: v4.0
https://github.com/mongodb/docs/commit/901689f81138fb9e6e5f220a4ed6cee09880178d

Comment by Githook User [ 18/Oct/18 ]

Author:

{'name': 'kay', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}

Message: DOCS-12150: 3.4-compat createCollection show invalid option
Branch: v3.6
https://github.com/mongodb/docs/commit/45b26cdf2685e6927f212279571d21ccc5c5b273

Comment by Githook User [ 18/Oct/18 ]

Author:

{'name': 'kay', 'email': 'kay.kim@10gen.com', 'username': 'kay-kim'}

Message: DOCS-12150: 3.4-compat createCollection show invalid option
Branch: v3.4
https://github.com/mongodb/docs/commit/9dd0b513db4a0587bc7727ed5cba009c101de122

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