[DOCS-6463] Comment on: "manual/reference/method/db.createCollection.txt" Created: 27/Oct/15  Updated: 30/Oct/23  Resolved: 17/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: Docs Collector User (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: bite-sized, docs-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

> db.version()
3.0.7

Location: https://docs.mongodb.org/manual/reference/method/db.createCollection/#db.createCollection
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36
Referrer: https://docs.mongodb.org/manual/reference/command/create/
Screen Resolution: 1600 x 1200
repo: docs
source: reference/method/db.createCollection


Participants:
Days since reply: 5 years, 17 weeks ago
Epic Link: DOCSP-1769
Story Points: 0.25

 Description   

The manual is inconsistent.

The size field is required for capped collections and ignored for other collections.

and

The following command simply pre-allocates a 2-gigabyte, uncapped collection named people:

db.createCollection("people", { size: 2147483648 } )

Unfortunately, the former is true.

> db.createCollection("people", { size: 2147483648 } )
{ "ok" : 1 }
> db.people.stats()
{
	"ns" : "test.people",
	"count" : 0,
	"size" : 0,
	"numExtents" : 1,
	"storageSize" : 8192,
	"lastExtentSize" : 8192,
	"paddingFactor" : 1,
	"paddingFactorNote" : "paddingFactor is unused and unmaintained in 3.0. It remains hard coded to 1.0 for compatibility only.",
	"userFlags" : 1,
	"capped" : false,
	"nindexes" : 1,
	"totalIndexSize" : 8176,
	"indexSizes" : {
		"_id_" : 8176
	},
	"ok" : 1
}



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

Remove old 2.4 behavior

Comment by Githook User [ 17/Oct/18 ]

Author:

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

Message: DOCS-6463: remove obsolete blurb from db.createCollection
Branch: v2.6
https://github.com/mongodb/docs/commit/7d6bc98f10eebde5d4a62d9fb1ef8be29e29b8a3

Comment by Githook User [ 17/Oct/18 ]

Author:

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

Message: DOCS-6463: remove obsolete blurb from db.createCollection
Branch: v3.0
https://github.com/mongodb/docs/commit/b622f821d96900fa4ea16c51132ff4b7bd14527e

Comment by Githook User [ 17/Oct/18 ]

Author:

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

Message: DOCS-6463: remove obsolete blurb from db.createCollection
Branch: v3.2
https://github.com/mongodb/docs/commit/a00c991de1bb53ee8600308e3b04ad8bcc92bec8

Comment by Githook User [ 17/Oct/18 ]

Author:

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

Message: DOCS-6463: remove obsolete blurb from db.createCollection
Branch: v3.4
https://github.com/mongodb/docs/commit/ce32065661ab11a983a4fc7e7993773927f5dcff

Comment by Githook User [ 17/Oct/18 ]

Author:

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

Message: DOCS-6463: remove obsolete blurb from db.createCollection
Branch: v3.6
https://github.com/mongodb/docs/commit/4db3f52b6b9dd9921c8938f84a0f398e011a95ab

Comment by Githook User [ 17/Oct/18 ]

Author:

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

Message: DOCS-6463: remove obsolete blurb from db.createCollection
Branch: v4.0
https://github.com/mongodb/docs/commit/f3167de768a58611ca8cf7a67abf3c823082e121

Comment by Githook User [ 17/Oct/18 ]

Author:

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

Message: DOCS-6463: remove obsolete blurb from db.createCollection
Branch: master
https://github.com/mongodb/docs/commit/6eda21a710c2e9cc68b5e37dd773035b7dd94f28

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