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

Refactor $geoNear searches into new query framework

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.4
    • Affects Version/s: 2.4.4
    • Component/s: Geo
    • ALL
    • Hide
      1. Insert 10 Million documents with location data (old-style coordinate pairs) into a collection
      2. build 2d index on the location field
      3. run long query with complex regexes and $near operator on the location field
      4. watch the secondaries throw socket exceptions after a short time, and finally cause an election and fail over the primary
      Show
      Insert 10 Million documents with location data (old-style coordinate pairs) into a collection build 2d index on the location field run long query with complex regexes and $near operator on the location field watch the secondaries throw socket exceptions after a short time, and finally cause an election and fail over the primary

      Refactor geospatial $geoNear/$nearSphere/geoNear command code to use the standard query framework and geometry covering changes from SERVER-5800.

      This refactor affects $geoNear in both 2D and 2DSphere indexes - no behavior change is intended.

      A side effect of this change is that progressive $geoNear sort is supported, and the full search does not have to be performed at once.

      Original Description:

      It appears that a long-running 2d-indexed geo query on a replica set with authentication will only yield when it finds matching documents. If the gap during which it does not find documents is long enough, it will become unresponsive, miss its heartbeats, and the secondaries assume it is down. Eventually they will cause an election and fail over the primary.

      During this time, the primary is fully aware of this and prints

      Fri Jun 21 17:17:13.307 [rsHealthPoll] replset info capslock.local:27018 thinks that we are down
      

            Assignee:
            greg_10gen Greg Studer
            Reporter:
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: