[SERVER-61916] Ensure all no-op entries are inserted before the recipient reads opLog in the unit test OplogApplierResumesFromLastNoOpOplogEntry Created: 03/Dec/21  Updated: 29/Oct/23  Resolved: 13/Dec/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.3.0

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Server Serverless 2021-12-13, Server Serverless 2021-12-27
Participants:
Linked BF Score: 24

 Description   

In the unit test  OplogApplierResumesFromLastNoOpOplogEntry, the test inserts 2 no-op entries to opLog and expects the recipient use the timestamp of the second entry to be the opLog applier’s beginApplingOpTime. 

But, the test doesn't have any way of knowing where the recipient service thread is when it does those two inserts. It is possible the recipient reads the opLog while only the first entry has been inserted. Here is the related issue BF-23416.

To reproduce the test case issue, add "sleepmillis(5*1000);" just before the second inserting https://github.com/mongodb/mongo/blob/b4517954a706b9f49b17d423f179113aa8632565/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp#L2007 

To fix the issue, we will set the fpAfterStartingOplogFetcherMigrationRecipientInstance , and then turn it off after inserting.



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

Author:

{'name': 'Sophia Tan', 'email': 'sophia_tll@hotmail.com', 'username': 'sophiatll'}

Message: SERVER-61916 Ensure all no-op entries are inserted before the recipient reads opLog in the unit test OplogApplierResumesFromLastNoOpOplogEntry
Branch: master
https://github.com/mongodb/mongo/commit/caa1c89688d523d69001aedc92ed174234e2b7ff

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