[SERVER-9647] Query using compound 2dsphere index with additional descending field can block indefinitely Created: 10/May/13  Updated: 11/Jul/16  Resolved: 19/May/13

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: 2.4.3
Fix Version/s: 2.4.4, 2.5.0

Type: Bug Priority: Major - P3
Reporter: Thomas Rueckstiess Assignee: hari.khalsa@10gen.com
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-9872 Server deadlock caused by infinite $n... Closed
Operating System: ALL
Participants:

 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)



 Comments   
Comment by auto [ 17/May/13 ]

Author:

{u'date': u'2013-05-15T15:06:32Z', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-9647 don't transform 2dsphere-indexed desc fields into asc
Branch: v2.4
https://github.com/mongodb/mongo/commit/8db5640d6c869440fd3ad0377f15c17a1f8ac04e

Comment by auto [ 15/May/13 ]

Author:

{u'date': u'2013-05-15T15:13:41Z', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-9647 fix test for small_oplog
Branch: master
https://github.com/mongodb/mongo/commit/3972b5c71c32a7db5bf93455d6b83cbff9bef6cd

Comment by auto [ 15/May/13 ]

Author:

{u'date': u'2013-05-15T13:50:08Z', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-9647 don't transform 2dsphere desc fields into asc
Branch: master
https://github.com/mongodb/mongo/commit/f965235efa02833d8055013525ff0433567e0d95

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