[SERVER-13347] OpDebug::execStats isn't being reset between operations Created: 25/Mar/14  Updated: 11/Jul/16  Resolved: 25/Mar/14

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 2.6.0-rc2
Fix Version/s: 2.6.0-rc3

Type: Bug Priority: Major - P3
Reporter: Tyler Brock Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

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()

Participants:

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



 Comments   
Comment by Githook User [ 25/Mar/14 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-13347 Clear execStats in OpDebug::reset()

(cherry picked from commit 23adfff477e84ef38d342da5767e77a139bcacfe)
Branch: v2.6
https://github.com/mongodb/mongo/commit/1502899e7fe49f45f736d29e6f46c05349d53f1f

Comment by Githook User [ 25/Mar/14 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-13347 Clear execStats in OpDebug::reset()
Branch: master
https://github.com/mongodb/mongo/commit/23adfff477e84ef38d342da5767e77a139bcacfe

Generated at Thu Feb 08 03:31:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.