[CDRIVER-1902] Round trip time not reset on disconnect Created: 03/Nov/16  Updated: 04/Nov/16  Resolved: 04/Nov/16

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: 1.2.0
Fix Version/s: 1.5.0

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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.



 Comments   
Comment by Githook User [ 04/Nov/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1902 reset round trip time on error

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.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/53a43737e29c2870459ff5ee986caa12a384d368

Generated at Wed Feb 07 21:13:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.