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

Query using compound 2dsphere index with additional descending field can block indefinitely

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4.4, 2.5.0
    • Affects Version/s: 2.4.3
    • Component/s: Geo
    • None
    • ALL

      Steps to reproduce

      1. create a 2dsphere index with an additional descending field (ascending doesn't trigger the bug)
      2. insert a document that doesn't have the additional field set
      3. run a geo query $geoWithin with $centerSphere and include the additional secondary field

      => The database will hang indefinitely and a kill -9 is necessary. db.currentOp() shows the query running but db.killOp() has no effect.

      Javascript

      db.mycoll.drop()
      db.mycoll.ensureIndex({"coordinates": "2dsphere", "field": -1})
      db.mycoll.insert({"coordinates" : [ -118.240013, 34.073893 ]})
      var query = {"coordinates" : {"$geoWithin" : {"$centerSphere" : [[-118.240013, 34.073893], 0.44915760491198753] } }, "field": 1}
      db.mycoll.find(query)
      

            Assignee:
            hari.khalsa@10gen.com hari.khalsa@10gen.com
            Reporter:
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: