[SERVER-53926] Tenant migration recipient should replace recipientSyncData (with returnAfterTimestamp) errors with interrupt status when appropriate Created: 20/Jan/21  Updated: 29/Oct/23  Resolved: 18/Feb/21

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

Type: Bug Priority: Major - P3
Reporter: Jason Chan Assignee: Vishnu Kaushik
Resolution: Fixed Votes: 0
Labels: pm-1791_milestone-B
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2021-02-08, Repl 2021-02-22
Participants:

 Description   

Currently, on the first recipientSyncData command (without returnAfterReachingDonorTimestamp), we wait on the dataConsistent future. On interrupts (due to stepdown, etc.) of the future chain, we override the error status with the interrupt status so that the donor is able to retry the recipientSyncData command.

However, the second recipientSyncData command (with returnAfterReachingDonorTimestamp) simply waits for an optime to be majority committed. We should do something similar where we override the error status to an interrupt when appropriate so that the donor is able to retry the recipientSyncData command without aborting the migration.

A second bug was found, which shows up after this issue is resolved. Once the donor retries, the second recipientSyncData command is sent to the new primary of the recipient RST. We may be in a state where the tenant oplog applier exists, but hasn't been started yet. This bug manifests as an invariant failure here after being called here.
The fix is to wait on the _dataConsistentPromise instead of the _dataSyncStartedPromise.



 Comments   
Comment by Githook User [ 18/Feb/21 ]

Author:

{'name': 'Vishnu Kaushik', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'}

Message: SERVER-53926 replace recipientSyncData (with returnAfterTimestamp) errors with interrupt status when appropriate
Branch: master
https://github.com/mongodb/mongo/commit/1ff65f085af47596a2048baa2a1ccf5d9c9a2755

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