[SERVER-42559] Race in WaitWithOpTimeEarlierThanLowestQueued causes it to fail Created: 31/Jul/19  Updated: 29/Oct/23  Resolved: 01/Aug/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.2.1, 4.3.1

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2
Sprint: Sharding 2019-08-12
Participants:
Linked BF Score: 43

 Description   

Most of the time, when the 2nd wait is queued, the background thread has not picked up the first wait yet, so it just cut in the line as expected. However, if the 2nd request is called and the background thread is already in the middle of waiting, it will get signalled instead. Before SERVER-42335, it will cause the future to become ready since it was not propagating the signal properly. After SERVER-42335, it will cause the test to hang because it is waiting for the future of the 2nd wait and was not expecting the 1st wait to "consume" the wait.



 Comments   
Comment by Githook User [ 13/Sep/19 ]

Author:

{'email': 'randolph@mongodb.com', 'name': 'Randolph Tan'}

Message: SERVER-42559 Make the WaitWithOpTimeEarlierThanLowestQueued test run more predictably

by making the test thread wait for the WaitForMajorityService thread pick up the 1st request before proceeding

(cherry picked from commit 2f815dbeb37750d5fcde13469322657780077e62)
Branch: v4.2
https://github.com/mongodb/mongo/commit/8e851fa90cff1eea6781ca3ef29950b05ec1ce6f

Comment by Githook User [ 01/Aug/19 ]

Author:

{'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}

Message: SERVER-42559 Make the WaitWithOpTimeEarlierThanLowestQueued test run more predictably

by making the test thread wait for the WaitForMajorityService thread pick up the 1st request before proceeding
Branch: master
https://github.com/mongodb/mongo/commit/2f815dbeb37750d5fcde13469322657780077e62

Generated at Thu Feb 08 05:00:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.