SDAM should respect serverSelectionTimeoutMS when erroring on initial connect

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.3.3
    • Affects Version/s: mongodb-client-encryption-0.3.0, 3.3.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In our current implementation of SDAM, if the TCP connection returns an error (ex: ENOENT or ECONNREFUSED), serverSelection will immediately fail. This appears to differ from other drivers, where they will keep trying to connect until the serverSelectionTimeoutMS is reached.

      This is important for libmongocrypt bindings. Other drivers are able to auto-spawn a mongocryptd, and then immediately attempt to connect, relying on a connection being successful before server selection timeout. B/c our server selection immediately fails, we need to rely on heuristics by checking for the existence of a valid mongocryptd.pid file, which can be flakey.

            Assignee:
            Matt Broadstone
            Reporter:
            Daniel Aprahamian (Inactive)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: