Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2121

SDAM should respect serverSelectionTimeoutMS when erroring on initial connect

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.3
    • Affects Version/s: mongodb-client-encryption-0.3.0, 3.3.0
    • Component/s: None
    • Labels:
      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@mongodb.com Matt Broadstone
            Reporter:
            daniel.aprahamian@mongodb.com Daniel Aprahamian (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: