[SERVER-36975] Fix race condition in read_concern_snapshot_catalog_invalidation.js Created: 04/Sep/18  Updated: 29/Oct/23  Resolved: 05/Sep/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.0.3, 4.1.3

Type: Bug Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Tess Avitabile (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Repl 2018-09-10
Participants:
Linked BF Score: 7

 Description   

In read_concern_snapshot_catalog_invalidation.js, there is code to wait for an operation to start. The test is racy because the test assumes that once waitForOp() has returned, the operation is hanging on a fail point. This is not necessarily true, and can cause the test to fail if the following happens:

1) The operation starts, but does not reach the fail point
2) waitForOp is run, and returns true
3) createIndexes is run
4) The operation reaches the fail point and preallocates a snapshot at a time that includes the new index, so the operation unexpectedly succeeds



 Comments   
Comment by Githook User [ 05/Sep/18 ]

Author:

{'name': 'Tess Avitabile', 'email': 'tess.avitabile@mongodb.com', 'username': 'tessavitabile'}

Message: SERVER-36975 Fix race condition in read_concern_snapshot_catalog_invalidation.js

(cherry picked from commit 0ee0cabe0a12006080521f47ebb43f36205736c7)
Branch: v4.0
https://github.com/mongodb/mongo/commit/1c23962dd2af6da3e6b3a33d3dd1a6097506ceab

Comment by Githook User [ 05/Sep/18 ]

Author:

{'name': 'Tess Avitabile', 'email': 'tess.avitabile@mongodb.com', 'username': 'tessavitabile'}

Message: SERVER-36975 Fix race condition in read_concern_snapshot_catalog_invalidation.js
Branch: master
https://github.com/mongodb/mongo/commit/d9b5ba2d1710d7f52536ab9c53c3a68329f61b90

Comment by Githook User [ 05/Sep/18 ]

Author:

{'name': 'Tess Avitabile', 'email': 'tess.avitabile@mongodb.com', 'username': 'tessavitabile'}

Message: Revert "SERVER-36975 Fix race condition in read_concern_snapshot_catalog_invalidation.js"

This reverts commit bd982824a7967b5e518bf9255b8f5e051bdaff7d.
Branch: master
https://github.com/mongodb/mongo/commit/28cef55d81126b04732eaa41ff8b20e45636dde1

Comment by Githook User [ 05/Sep/18 ]

Author:

{'name': 'Tess Avitabile', 'email': 'tess.avitabile@mongodb.com', 'username': 'tessavitabile'}

Message: SERVER-36975 Fix race condition in read_concern_snapshot_catalog_invalidation.js
Branch: master
https://github.com/mongodb/mongo/commit/bd982824a7967b5e518bf9255b8f5e051bdaff7d

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