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

Haystack geoSearch accepts NaN for 'limit' and 'maxDistance'

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.4.16, 4.2.22
    • Component/s: None
    • None
    • Query Optimization
    • ALL

      The geoSearch command (GeoHaystackSearchCommand) uses the unsafe numberInt() method for the 'limit' and 'maxDistance' arguments. This means passing NaN will have different behavior on different platforms.

      limit NaN:

      • x86: effectively no limit.
      • arm: empty results.

      maxDistance NaN:

      • x86: empty results.
      • arm: point query.

      Ideally the parser should reject this argument since it doesn't make sense.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: