[SERVER-61869] Race in DuplicateReturnAfterReachingTimestamp test Created: 02/Dec/21  Updated: 29/Oct/23  Resolved: 17/Dec/21

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 5.2.0-rc2, 5.3.0-rc0, 5.1.0-rc4

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
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:
v5.2, v5.1
Participants:
Linked BF Score: 46

 Description   

This test expects two threads to simultaneously update the tenant migration recipient state doc with the same value for the rejectReadsBeforeTimestamp field. This is the SERVER-60969 scenario, and the test checks that the server detected and logged it.

If the first thread writes to the state doc and calls logOp() it will advance lastApplied, and the second thread will choose max(returnAfterReachingTimestamp, lastApplied) as the rejectReadsBeforeTimestamp. Thus it will update the state doc with a different rejectReadsBeforeTimestamp and its write will NOT be a no-op. Make logOp() hang to force the test scenario.



 Comments   
Comment by Githook User [ 17/Dec/21 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-61869 Fix race in migration test

(cherry picked from commit 7abd35a7a1721c9ed43e3a3961cd93b0421a4010)
Branch: v5.2
https://github.com/mongodb/mongo/commit/0f92a94666961db0447e0102b8a39b4ceddf047a

Comment by Githook User [ 17/Dec/21 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-61869 Fix race in migration test

(cherry picked from commit 7abd35a7a1721c9ed43e3a3961cd93b0421a4010)
Branch: v5.1
https://github.com/mongodb/mongo/commit/17e26a04ee2666a88b10a58afa018a3bccaa6fc5

Comment by Githook User [ 17/Dec/21 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-61869 Fix race in migration test
Branch: master
https://github.com/mongodb/mongo/commit/7abd35a7a1721c9ed43e3a3961cd93b0421a4010

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