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

The touch command does not work with WiredTiger storage engine

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.8.0-rc2
    • Affects Version/s: 2.7.8
    • Component/s: Storage
    • None
    • ALL
    • Hide
      // command run with WiredTiger Storage engine - 2.7.9-pre
       
      db.runCommand({ touch: "data", data: true, index: true });
      {
      	"data" : {
      		"numRanges" : 1,
      		"millis" : 0
      	},
      	"indexes" : {
      		"num" : 1,
      		"millis" : 0
      	},
      	"ok" : 1
      }
       
      // command run with mmap v1 (same data set)
       
      > db.runCommand({ touch: "data", data: true, index: true });
      {
      	"data" : {
      		"numRanges" : 31,
      		"millis" : 304555
      	},
      	"indexes" : {
      		"num" : 1,
      		"millis" : 53862
      	},
      	"ok" : 1
      }
      
      Show
      // command run with WiredTiger Storage engine - 2.7.9-pre db.runCommand({ touch: "data" , data: true , index: true }); { "data" : { "numRanges" : 1, "millis" : 0 }, "indexes" : { "num" : 1, "millis" : 0 }, "ok" : 1 } // command run with mmap v1 (same data set) > db.runCommand({ touch: "data" , data: true , index: true }); { "data" : { "numRanges" : 31, "millis" : 304555 }, "indexes" : { "num" : 1, "millis" : 53862 }, "ok" : 1 }

      The touch command returns instantly when using WiredTiger storage engine and does not actually load anything into memory. Using mmap v1 storage engine still works as expected.

      This may not be possible with WT (and others). If so, we should have the command check and carp if the engine does not support it.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            adam@comerford.net Adam Comerford
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: