[SERVER-53676] Race in RecipientForgetMigration_WaitUntilStateDocInitialized Created: 08/Jan/21  Updated: 29/Oct/23  Resolved: 12/Jan/21

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

Type: Bug Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Lingzhi Deng
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: Repl 2021-01-25
Participants:
Linked BF Score: 0

 Description   

The test expects an empty StartApplyingDonorOpTime. But the test doesn't have a failpoint to block the future chain from getting one and this could race with the this onReceiveRecipientForgetMigration. If the interruption from the recipientForgetMigration gets in before the future chain calling _getStartOpTimesFromDonor, the test will pass. However, if the interrupt gets in after that, the state doc could have a StartApplyingDonorOpTime and/or StartFetchingDonorOpTime. Additionally, if the interrupt comes after the cloners have started, the test is also missing mock responses for the requests coming from the donors.

The test is only testing that onReceiveRecipientForgetMigration must wait until the state doc is initialized. So we don't have to have the chain run beyond fpAfterPersistingTenantMigrationRecipientInstanceStateDoc. Therefore, adding a failpoint will fix this.



 Comments   
Comment by Githook User [ 12/Jan/21 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-53676: Hang after persisting state doc in test RecipientForgetMigration_WaitUntilStateDocInitialized
Branch: master
https://github.com/mongodb/mongo/commit/b6cb60db7b6e3de8ebee94a9711334d3fc037d0c

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