[SERVER-48510] StorageTimestampTests::TimestampIndexOplogApplicationOnPrimary hangs due to race between _tryCommit and IndexBuildState::kInProgress Created: 30/May/20  Updated: 29/Oct/23  Resolved: 01/Jun/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.4.0-rc8, 4.7.0

Type: Bug Priority: Minor - P4
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
is related to SERVER-46560 Make Abort index build logic determin... Closed
is related to SERVER-46722 update StorageTimestampTests Timestam... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Execution Team 2020-06-15
Participants:
Linked BF Score: 0

 Description   

This test may wait indefinitely as it is trying to apply the commitIndexBuild oplog entry.

The index build commit code keeps checking the pre-commit condition every 100 ms. If the index build thread is still setting up when _tryCommit is trying to evaluate the pre-commit condition, the condition fails, leading to the test waiting indefinitely because OperationContext::sleepFor() never returns.

The wait function in the OperationContext is dependent on the ClockSource installed in the ServiceContext. For the dbtests framework, the implementation used is the ClockSourceMock, which needs to be advanced explicitly by the test code.



 Comments   
Comment by Benety Goh [ 01/Jun/20 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-48510 fix race in StorageTimestampTest::TimestampIndexOplogApplicationOnPrimary

(cherry picked from commit 16d49c9b6496227aae24a0f7ead6dce5053b33d2

Branch: v4.4
https://github.com/mongodb/mongo/commit/092b9da3ddcef9aac0538dfac8955ff23edbc4d4

Comment by Githook User [ 01/Jun/20 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-48510 fix race in StorageTimestampTest::TimestampIndexOplogApplicationOnPrimary
Branch: master
https://github.com/mongodb/mongo/commit/16d49c9b6496227aae24a0f7ead6dce5053b33d2

Comment by Benety Goh [ 30/May/20 ]

Test case was last updated in SERVER-46722. Commit retry logic was introduced in SERVER-46560.

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