[SERVER-16069] Input validation on the arguments to createCollection Created: 11/Nov/14  Updated: 23/Mar/15  Resolved: 13/Nov/14

Status: Closed
Project: Core Server
Component/s: Storage, Usability
Affects Version/s: 2.8.0-rc0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ramon Fernandez Marina Assignee: Benety Goh
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-16083 Creating collections should error wit... Closed
Related
related to SERVER-16135 WT Storage engine options should be r... Closed
is related to SERVER-13635 Clean up the storage abstraction layer Closed
Operating System: ALL
Participants:

 Description   

Arguments to createCollection need better validation:

  • Start mongod with the WT storage engine

    $ rm -rf db && mkdir db && mongod --dbpath db  --storageEngine wiredtiger

  • Create a collection

    > db.createCollection("foo", {storageEngine: {wiredTiger: {configString: "foo=bar"}}})
    { "ok" : 1 }

The casing of the storage engine is incorrect, it should be wiredtiger (no uppercase T), but the options are ignored without errors in the shell or the logs. For that matter the following also works:

> db.createCollection("foo", {storageEngine: {x: {y : "z"}}})
{ "ok" : 1 }

This is bound to cause come confusion among users.



 Comments   
Comment by Scott Hernandez (Inactive) [ 13/Nov/14 ]

This broke replication and will be backed-out with SERVER-16135.

Comment by Githook User [ 12/Nov/14 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-16069 Input validation on the arguments to createCollection
Branch: master
https://github.com/mongodb/mongo/commit/546bf9a6d7b2c53e81d6a31b652cef15ec103570

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