Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12150

3.4 Compatibility Notes has an example of a command that doesn't work, but it does

      Description

      https://docs.mongodb.com/manual/release-notes/3.4-compatibility/#stricter-validation-of-collection-and-index-specifications says
      > For example, the following operation is no longer valid:

      db.createCollection( "myCappedCollection", { capped: true,  size: 5242880 } )
      

      However, this command works fine on my 3.4.16 node

      $ mongo --port 27018
      MongoDB shell version v3.4.16
      connecting to: mongodb://127.0.0.1:27018/
      MongoDB server version: 3.4.16
      Server has startup warnings:
      2018-10-16T16:46:43.648+1100 I CONTROL  [initandlisten]
      2018-10-16T16:46:43.648+1100 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
      2018-10-16T16:46:43.648+1100 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
      2018-10-16T16:46:43.648+1100 I CONTROL  [initandlisten]
      shard01:PRIMARY> db.createCollection( "myCappedCollection", { capped: true,  size: 5242880 } )
      { "ok" : 1 }
      

      It also matches the spec in the same docs https://docs.mongodb.com/manual/reference/method/db.createCollection/#db.createCollection

      Can we change this example in the docs? It's not clear if there's something specific we want to demonstrate, but you have to specify valid options, so this no longer works:

      db.createCollection( "myCappedCollection", { customoption: true} )
      

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            joanna.cheng@mongodb.com Joanna Cheng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              5 years, 28 weeks, 1 day ago