Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-195

Support new storage engine options for createCollection.

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None

      Similar to DRIVERS-194. Drivers that provide a createCollection or similar helper must support the new createCollection command options added in MongoDB 2.8. Drivers that already accept arbitrary options for these helpers only have to review and adjust documentation. Drivers that have builders or validate all options will have to add explicit support.

      See SERVER-16137 for more information.

      Since the server does not report an error on an invalid field in the createCollection command, if you want to validate you have to use the listCollections command, e.g.

      > db.createCollection('test', {storageEngine: {wiredTiger: {configString: 'block_compressor=zlib'}}})
      { "ok" : 1 }
      > db.runCommand('listCollections')
      {
      	"collections" : [
      		{
      			"name" : "system.indexes",
      			"options" : {
      
      			}
      		},
      		{
      			"name" : "test",
      			"options" : {
      				"flags" : 1,
      				"storageEngine" : {
      					"wiredTiger" : {
      						"configString" : "block_compressor=zlib"
      					}
      				}
      			}
      		}
      	],
      	"ok" : 1
      }
      

            Assignee:
            barrie Barrie Segal
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: