Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-390

Call "ping" on a socket that has been idle for socketCheckIntervalMS

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Component/s: None
    • None

      Change to specification for single-threaded clients and the meaning of socketCheckIntervalMS.

      Before, single-threaded drivers were required to call "ismaster" on a socket that's been idle for socketCheckIntervalMS before using the socket. It was not clear what the driver should do with the ismaster response, or what it should do if ismaster failed.

      Instead, what the driver should do is re-check an idle socket right after server selection. If a server is selected that has an existing connection that's been idle for 5 seconds, the driver should attempt to call "ping", not ismaster, since we're not trying to update the topology. If "ping" succeeds, use the socket. If it failed, set the server's type to Unknown and re-enter server selection once, re-discovering the topology if needed (as SDAM already specifies), then proceed from there.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: