Reconnect the underlying socket for a client on server selection timeout

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Server Selection
    • None
    • None
    • Go Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      From work in REP-6576, if a go-driver client receives a server selection timeout due to a change in the IP address of the connected mongos/mongod process, any further server interactions, including retries for the failed command, will continue to fail. The only fix is to reconnect to the server by re-discovering the new IP for the mongos/mongod process.

      While the application layer can achieve the same by creating a fresh client upon receiving server selection timeouts, this is fairly cumbersome and prone to exhaust the connection pool if done incorrectly.

      Definition of done

      Trigger a server selection error by modifying the IP of the connected mongod/mongos process and ensure that a subsequent operation on the failed client succeeds and the underlying socket is recreated.

      Pitfalls

      What should the implementer watch out for? What are the risks?

            Assignee:
            Qingyang Hu
            Reporter:
            Mankawaldeep Singh
            None
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: