[SERVER-14802] improve sleepmillis() resolution under Windows Created: 06/Aug/14  Updated: 28/Oct/15  Resolved: 12/Aug/14

Status: Closed
Project: Core Server
Component/s: Performance
Affects Version/s: 2.6.3, 2.7.4
Fix Version/s: 2.7.5

Type: Bug Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: community-team, pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-9580 Multiple tailable cursors against the... Closed
Operating System: ALL
Participants:
Linked BF Score: 0

 Description   

sleepmillis() under Windows can sometimes exceed the requested duration by an unacceptable period.

When this happens, this causes unit tests such as BasicTests::sleepiest to fail because the test is expecting the actual sleep duration to fall within a given range.



 Comments   
Comment by Githook User [ 12/Aug/14 ]

Author:

{u'username': u'jsbattig', u'name': u'Jose Sebastian Battig', u'email': u'jsbattig@convey.com'}

Message: SERVER-14802 Fixed problem with sleepmillis() on Windows due to default timer resolution on
resolution to be set high (usually above 15ms). All sleepmillis() calls with
values lesser than timer resolution will sleep AT LEAST the timer resolution
value, making Mongo be really slow on certain use cases.

Related to SERVER-9580

Closes #618

Signed-off-by: Benety Goh <benety@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/e2a58d5fd4e3f0d64bb5ba10de87ca48365617fc

Generated at Thu Feb 08 03:36:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.