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

Round trip time not reset on disconnect

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.0
    • Affects Version/s: 1.2.0
    • Component/s: libmongoc
    • Labels:
      None

      After a server description is invalidated (typically from a socket hangup during an application operation), its RTT should be reset. The next time we successfully connect to it, the new RTT begins a new series of moving averages.

      The Server Discovery And Monitoring Spec says about a server description, "if it changes from a known type to Unknown its RTT is set to null."

      The C Driver instead records an RTT of 0 and factors this into the moving average. Therefore, a server that we have failed to reach for the last few checks and then successfully connected to, appears to have a very low latency and it is preferred for reads.

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

              Created:
              Updated:
              Resolved: