[SERVER-26904] URI parse interprets `socketTimeoutMS` value as seconds (not ms) Created: 03/Nov/16  Updated: 19/Nov/16  Resolved: 07/Nov/16

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 3.4.0-rc3

Type: Bug Priority: Major - P3
Reporter: Matt Cotter Assignee: Matt Cotter
Resolution: Done Votes: 0
Labels: platforms-hocr
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2016-11-21
Participants:

 Description   

MongoURI::connect parses the value of the argument, then passes it to ConnectionString::connect, which hands it off to DBClientConnection::setSoTimeout which takes seconds.

Since this is clearly too easy to get wrong, I think the fix should be to switch to using durations. for all of the above.

However the alternative is to divide by 1000 right after parsing because ConnectionString::connect is also called (correctly?) with a value in seconds.



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

Author:

{u'username': u'Machyne', u'name': u'Matt Cotter', u'email': u'matt.cotter@mongodb.com'}

Message: SERVER-26904 correctly parse socketTimeoutMS as ms
Branch: master
https://github.com/mongodb/mongo/commit/dfbe4019a5f5a97e712f9992ac9e5e896424ae01

Generated at Thu Feb 08 04:13:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.