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

Equality queries on _id aren't covered

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.6.0-rc0
    • Fix Version/s: 2.6.0-rc2
    • Component/s: Querying
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      Description

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: