Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-19083

WiredTiger creationString in collstats contains non-collection level options

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: 3.0.4
    • Fix Version/s: 3.1.6
    • Component/s: WiredTiger
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      backup_test:PRIMARY> use wt_test
      switched to db wt_test
      backup_test:PRIMARY> db.createCollection("source")
      { "ok" : 1 }
      backup_test:PRIMARY> var creationString = db.runCommand({"collstats":"source"})["wiredTiger"]["creationString"]
      backup_test:PRIMARY> creationString
      allocation_size=4KB,app_metadata=(formatVersion=1),block_allocation=best,block_compressor=snappy,cache_resident=0,checkpoint=,checkpoint_lsn=,checksum=uncompressed,collator=,columns=,dictionary=0,format=btree,huffman_key=,huffman_value=,id=16,internal_item_max=0,internal_key_max=0,internal_key_truncate=,internal_page_max=4KB,key_format=q,key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=32KB,leaf_value_max=1MB,memory_page_max=10m,os_cache_dirty_max=0,os_cache_max=0,prefix_compression=0,prefix_compression_min=4,split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90,value_format=u,version=(major=1,minor=1)
      backup_test:PRIMARY> db.createCollection("dest", {storageEngine:{wiredTiger:{configString:creationString}}})
      { "errmsg" : "exception: 22: Invalid argument", "code" : 2, "ok" : 0 }
      

      Show
      backup_test:PRIMARY> use wt_test switched to db wt_test backup_test:PRIMARY> db.createCollection("source") { "ok" : 1 } backup_test:PRIMARY> var creationString = db.runCommand({"collstats":"source"})["wiredTiger"]["creationString"] backup_test:PRIMARY> creationString allocation_size=4KB,app_metadata=(formatVersion=1),block_allocation=best,block_compressor=snappy,cache_resident=0,checkpoint=,checkpoint_lsn=,checksum=uncompressed,collator=,columns=,dictionary=0,format=btree,huffman_key=,huffman_value=,id=16,internal_item_max=0,internal_key_max=0,internal_key_truncate=,internal_page_max=4KB,key_format=q,key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=32KB,leaf_value_max=1MB,memory_page_max=10m,os_cache_dirty_max=0,os_cache_max=0,prefix_compression=0,prefix_compression_min=4,split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90,value_format=u,version=(major=1,minor=1) backup_test:PRIMARY> db.createCollection("dest", {storageEngine:{wiredTiger:{configString:creationString}}}) { "errmsg" : "exception: 22: Invalid argument", "code" : 2, "ok" : 0 }
    • Sprint:
      Quint Iteration 6

      Description

      I would like to be able to create a collection with the same wiredTiger collection options as an existing collection. If I take the wiredTiger.creationString field from the collstats command to pass to the createCollection command it fails with:

      Error creating `test.test`: { "serverUsed" : "127.0.0.1:27502" , "errmsg" : "exception: 22: Invalid argument" , "code" : 2 , "ok" : 0.0}
      

      and write the following to the MongoDB log:

      session.create: unknown configuration key: 'checkpoint': Invalid argument
      

      It seems that the collstats output contains options that are not valid at the collection level.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              max.hirschhorn Max Hirschhorn
              Reporter:
              cory.mintz Cory Mintz
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: