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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.4.3
    • Fix Version/s: 2.4.4, 2.5.0
    • Component/s: Geo
    • Labels:
      None
    • Operating System:
      ALL

      Description

      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)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: