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

OpDebug::execStats isn't being reset between operations

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.0-rc3
    • Affects Version/s: 2.6.0-rc2
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Hide
      db.setProfilingLevel(2)
      db.test.insert({words: "test"})
      db.test.ensureIndex({words:"text"})
      db.test.aggregate([{$match: {$text: {$search: "test"}}}])
      db.system.profile.find({
          "command.aggregate": {$exists: true},
          "execStats.type":"COLLSCAN"
      }).pretty()
      
      Show
      db.setProfilingLevel(2) db.test.insert({words: "test" }) db.test.ensureIndex({words: "text" }) db.test.aggregate([{$match: {$text: {$search: "test" }}}]) db.system.profile.find({ "command.aggregate" : {$exists: true }, "execStats.type" : "COLLSCAN" }).pretty()

      Original title: Aggregate involving Text search reported by profiler as COLLSCAN

      This manifests as a non-query having the execStats of the last query.

      Text search query can't possibly be a collection scan:

      {
      	"op" : "command",
      	"ns" : "test.$cmd",
      	"command" : {
      		"aggregate" : "test",
      		"pipeline" : [
      			{
      				"$match" : {
      					"$text" : {
      						"$search" : "test"
      					}
      				}
      			}
      		],
      		"cursor" : {
      			
      		}
      	},
      	"keyUpdates" : 0,
      	"numYield" : 0,
      	"lockStats" : {
      		"timeLockedMicros" : {
      			"r" : NumberLong(205),
      			"w" : NumberLong(0)
      		},
      		"timeAcquiringMicros" : {
      			"r" : NumberLong(4),
      			"w" : NumberLong(3)
      		}
      	},
      	"responseLength" : 138,
      	"millis" : 0,
      	"execStats" : {
      		"type" : "COLLSCAN",
      		"works" : 29,
      		"yields" : 0,
      		"unyields" : 0,
      		"invalidates" : 0,
      		"advanced" : 27,
      		"needTime" : 1,
      		"needFetch" : 0,
      		"isEOF" : 1,
      		"docsTested" : 27,
      		"children" : [ ]
      	},
      	"ts" : ISODate("2014-03-25T20:31:12.204Z"),
      	"client" : "127.0.0.1",
      	"allUsers" : [ ],
      	"user" : ""
      }
      

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            tyler@10gen.com Tyler Brock
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: