[SERVER-6410] "create" command should intrepret same user flags as "collMod" command Created: 11/Jul/12  Updated: 06/Dec/22  Resolved: 14/Sep/18

Status: Closed
Project: Core Server
Component/s: MMAPv1, Storage
Affects Version/s: 2.1.2
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Kevin Matulef Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-5046 per collection option to pad to power... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

Right now there are a couple ways to set the "usePowerOf2" user flag on a collection.

1) Create the collection. Then later call

db.runCommand( { "collMod" : coll ,  "usePowerOf2Sizes" : true } );

2) At creation time, run

db.runCommand( {"create" : coll,  "flags" : 1 } );

The latter is not very intuitive, since it relies on the user knowing how to interpret the "flags" bitmask.

We should allow a syntax like this:

db.runCommand( {"create" : coll,  "usePowerOf2Sizes" : true  } );

and more generally, any option you can pass to "collMod" should also be something you can pass to "create".


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