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

Equality queries on _id aren't covered

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.6.0-rc2
    • Affects Version/s: 2.6.0-rc0
    • Component/s: Querying
    • Labels:
    • Fully Compatible
    • ALL

      Regression from 2.4. Presumably never implemented for the IDHack runner?

      2.4.9:

      > db.foo.find({_id:1},{_id:1}).explain()
      {
      	"cursor" : "BtreeCursor _id_",
      	"isMultiKey" : false,
      	"n" : 1,
      	"nscannedObjects" : 0, // zero
      	"nscanned" : 1,
      	"nscannedObjectsAllPlans" : 0,
      	"nscannedAllPlans" : 1,
      	"scanAndOrder" : false,
      	"indexOnly" : true,
      	"nYields" : 0,
      	"nChunkSkips" : 0,
      	"millis" : 0,
      	"indexBounds" : {
      		"_id" : [
      			[
      				1,
      				1
      			]
      		]
      	},
      	"server" : "Rassi-MacBook-Pro.local:27017"
      }
      

      2.6.0-rc0:

      > db.foo.find({_id:1},{_id:1}).explain()
      {
      	"cursor" : "IDCursor",
      	"n" : 1,
      	"nscannedObjects" : 1, // not zero
      	"nscanned" : 1,
      	"millis" : 0,
      	"indexBounds" : {
      		"_id" : [
      			[
      				1,
      				1
      			]
      		]
      	},
      	"server" : "Rassi-MacBook-Pro.local:27017"
      }
      >
      

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: