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

Manual configuration of geo 2dsphere index levels may crash on query

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 3.1.6
    • None
    • Geo
    • None
    • Fully Compatible
    • ALL
    • Hide

      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]}}}})
      

      Show
      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]}}}})

    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.

      Attachments

        Activity

          People

            kevin.albertson@mongodb.com Kevin Albertson
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: