Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1435

Retry server selection if, after selection, a socket is determined to be unsuitable before a message is sent on it

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Connection Mgmt
    • None

      From the server selection spec:

      After a server is selected, several error conditions could still occur that make the selected server unsuitable for sending the operation, such as:

      • the server could have shutdown the socket (e.g. a primary stepping down),
      • a connection pool could be empty, requiring new connections; those connections could fail to connect or could fail the server handshake

      This specification does not require nor prohibit drivers from attempting automatic recovery for various cases where it might be considered reasonable to do so, such as:

      • repeating server selection if, after selection, a socket is determined to be unsuitable before a message is sent on it

      Retrying server selection when a socket is determined to be unsuitable before a message is sent on it would minimize the chance that applications see "NotMasterError: not master" or "AutoReconnect: connection closed" errors.

      This ticket is a reminder that this improvement is possible.

            Assignee:
            Unassigned Unassigned
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: