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

executor::ConnectionPool should appropriately handle the case where a connection is returned with a network error

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 6.0.7, 7.0.0-rc4
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Fully Compatible
    • v7.0, v6.0
    • Service Arch 2023-06-12, Service Arch 2023-06-26

      Essentially, we need to address this TODO: https://github.com/mongodb/mongo/blob/744678da09dcab9885ae6af3e368864387fbfb82/src/mongo/executor/connection_pool.cpp#L1013 

      Currently, when a connection is checked out from the pool and is returned with failure indicated, we discard that individual connection. However, we don't examine the failure in any way, and don't drop other connections to the same host (and bump the SpecificPool generation appropriately) if the failure is a Network error or other error that leads us to believe that the host is down and current-generation connections are likely to be unhealthy. 

      This is distinct from the behavior in the case where we  observe a network-error on a connection during the refresh process; in this case, we treat the host as down, bump the generation of the SpecificPool to that host, and drop other connections to that host. The cases of a network error on a returned connection vs. one that has finished refreshing are very similar and should probably be treated in the same manner. 

            Assignee:
            george.wangensteen@mongodb.com George Wangensteen
            Reporter:
            george.wangensteen@mongodb.com George Wangensteen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: