Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1426

Race recording error message in mongoc_topology_scanner_finish

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 1.5.0
    • 1.4.0
    • libmongoc, tests
    • None

    Description

      For example:

       [2016/07/27 13:20:59.677] Begin /server_selection/errors/dns/direct/pooled
       [2016/07/27 13:21:00.704] FAIL
       [2016/07/27 13:21:00.704] Assert Failure: "No suitable servers found: `serverSelectionTimeoutMS` expired" != "No suitable servers found: `serverSelectionTimeoutMS` expired: [Failed to resolve 'example-localhost']"
       [2016/07/27 13:21:00.937]     { "status": "FAIL", "test_file": "/server_selection/errors/dns/direct/pooled", "seed": "1573355641", "start": 7952268.906781541, "end": 7952270.166590696, "elapsed": 1.259809155 },
      

      The problem is, we can't predict how long getaddrinfo takes to fail. If it's longer than serverSelectionTimeoutMS we'll just see "no suitable servers" without the characteristic "failed to resolve" message.

      For now, make serverSelectionTimeoutMS longer. In the future, probably need to override mongoc_client_default_stream_initiator with a mock initiator that fills out "error" and never calls getaddrinfo.

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: