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

mongos keeps bad connections around to downed hosts

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Networking, Sharding
    • None
    • Service Arch
    • ALL

      Due to the split between the legacy connection pool, and the various NetworkInterfaceASIO connection pools, information about network errors is not fully exploited.

      Consider the following scenario:

      In a sharded cluster, one shard is restarted. A client runs a find command against mongos, which fails as a bad connection is used. Mongos then correctly dumps all the connections it has to the shard. The client retries the find and it works.

      However, if the client then runs a 'count command' it will then fail, since bad connections to the downed shard are still present in the legacy connection pool.

      The fix here is to drop all pooled connections to a bad host in ALL pools when a network error is detected.

      I have also attached a jstest that reproduces the problem.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            adam.midvidy Adam Midvidy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: