[SERVER-16233] add support for storage options to createIndex Created: 19/Nov/14  Updated: 27/Oct/15  Resolved: 03/Dec/14

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

Type: Improvement Priority: Major - P3
Reporter: Eric Milkie Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CSHARP-1108 Add support for storage options to Cr... Closed
Documented
is documented by DOCS-4477 Document createCollection and createI... Closed
Duplicate
is duplicated by SERVER-16039 Enable passing WT specific configurat... Closed
Related
related to SERVER-16137 Validate collection options for all r... Closed
is related to DRIVERS-194 add support for storage options to cr... Closed
is related to SERVER-13635 Clean up the storage abstraction layer Closed
is related to SERVER-16111 Store & display catalog creation meta... Closed
Tested
Participants:

 Description   

In the same vein as createCollection storage options.

This needs to be aligned with work that milkie is doing to persist the catalog metadata options. See: SERVER-16111 and SERVER-16137.



 Comments   
Comment by Githook User [ 03/Dec/14 ]

Author:

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

Message: SERVER-16233 validate storage engine options at index creation
Branch: master
https://github.com/mongodb/mongo/commit/225aa52bd22a54d06cc090e7cd4b0fd4312213b2

Comment by Githook User [ 03/Dec/14 ]

Author:

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

Message: SERVER-16233 common function to validate both collection and index storage options
Branch: master
https://github.com/mongodb/mongo/commit/67ed2dc89414df8dcd951fae9964fc3c5b5d0b46

Comment by Githook User [ 03/Dec/14 ]

Author:

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

Message: SERVER-16233 storage engine factories support index options validation
Branch: master
https://github.com/mongodb/mongo/commit/5ebf0f69ee53cde7c5d2a1289609ee1692705c97

Comment by Githook User [ 03/Dec/14 ]

Author:

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

Message: SERVER-16233 added WiredTigerIndex::generateCreateString to construct configuration strings for index creation
Branch: master
https://github.com/mongodb/mongo/commit/63ffe70aec1309ff679d6ba6c0272524e767ad69

Comment by Eric Milkie [ 26/Nov/14 ]

We may in the future convert some of the WiredTiger storage engine options into explicit BSON booleans/integers as part of the createIndex command spec, but for now it will just be a BSON string parameter. This string will be passed to any pluggable storage engine, so it will probably always remain as a parameter to this command.
Your point of allowing integers in the "options" BSON to this command is well-taken, and we definitely should consider this when we implement the planned common command parameter parsing code.

Comment by David Golden [ 26/Nov/14 ]

Users of the Perl driver are going to have problems if arbitrary storage engine option are strongly typed. For example, the existing boolean options (e.g. unique, sparse) need custom handling in the driver to coerce them into special classes that serialize to BSON booleans. If arbitrary options likewise require boolean values to be coerced on the driver side, the driver won't know which ones to convert and users will have to do it themselves, which they'll almost certainly forget to do because Perl doesn't have a boolean type.

We could make life easier for users if boolean index options also allowed BSON integers to determine true/false values.

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