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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.6
    • Component/s: Geo
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      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

          Issue Links

            Activity

              People

              Assignee:
              kevin.albertson Kevin Albertson
              Reporter:
              kevin.albertson Kevin Albertson
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: