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

OpDebug::execStats isn't being reset between operations

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.6.0-rc2
    • Fix Version/s: 2.6.0-rc3
    • Component/s: Querying
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      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()

      Description

      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" : ""
      }

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: