[SERVER-58618] Sleep intervals in interruptible_test cause imprecision Created: 16/Jul/21 Updated: 29/Oct/23 Resolved: 29/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.0-rc0, 5.0.20 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Alex Li | Assignee: | Alex Li |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | carry-over, servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v5.0
|
||||||||
| Sprint: | Service Arch 2021-08-09 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 33 | ||||||||
| Story Points: | 1 | ||||||||
| Description |
|
waitForConditionOrInterruptUntil relies on our defined waitForConditionOrInterruptNoAssertUntil, which sleeps for kPrecision milliseconds before waking to check deadline in a loop. The comment suggests that kPrecision is to deal with inaccuracies, but is used in waitForConditionOrInterruptNoAssertUntil as an interval between sleeps. Then the problem would be that if Date_t::now() == 3:59.99 and deadline == 4:00.00 for example, the next iteration of the loop would be no earlier than Date_t::now() == 4:00.04. Therefore, the time needed for scheduling and timing inaccuracies could cause the end time to be greater than the deadline time. Suggested changes: use sleepFor function instead of a loop + sleep intervals. |
| Comments |
| Comment by Githook User [ 12/Jul/23 ] |
|
Author: {'name': 'Alex Li', 'email': 'alex.li@mongodb.com', 'username': 'lia394126'}Message: (cherry picked from commit d34cc3d0cce60f9e301cdf2096284297e2d4379d) |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 28/Jul/21 ] |
|
Author: {'name': 'Alex Li', 'email': 'alex.li@mongodb.com', 'username': 'alexli12456'}Message: |
| Comment by Githook User [ 16/Jul/21 ] |
|
Author: {'name': 'Alex Li', 'email': 'alex.li@mongodb.com'}Message: |