[SERVER-19267] Manual configuration of geo 2dsphere index levels may crash on query Created: 02/Jul/15  Updated: 23/Jul/15  Resolved: 21/Jul/15

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: None
Fix Version/s: 3.1.6

Type: Bug Priority: Minor - P4
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-18958 Optimize default covering levels of q... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

db.coll.insert({loc: {type: "Point", coordinates: [106.6331,10.7395]}})
db.coll.createIndex({loc: "2dsphere"}, {coarsestIndexedLevel: 30, finestIndexedLevel: 30})
db.coll.find({loc: {$near: {$geometry: {type:"Point", coordinates:[106.6331,10.7395]}}}})

Participants:

 Description   

If the coarsest level of the geo 2dsphere index is set >= 27, it will result in an assertion error in S2 on certain points. This is caused by https://github.com/mongodb/mongo/blob/master/src/mongo/db/query/expression_index.cpp#L113 which does not enforce that 4 + coarsestLevel <= 30.



 Comments   
Comment by Siyuan Zhou [ 21/Jul/15 ]

If this problem is actually fixed by SERVER-18958, feel free to close this one.

Comment by Kevin Albertson [ 02/Jul/15 ]

The patch for SERVER-18958 should fix this.

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