-
Type: Task
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
A race is possible between movePrimaryRecipientAbortMigration and movePrimaryRecipientSyncData such that the former is received first. Once the movePrimaryRecipientSyncData is finally received it will not do anything seeing the "aborted" state. Now if the command is received after the doc is deleted the recipient may end up restarting migration which is not intended.
A possible solution is to use retryable writes [suggested by Max] i.e. We send the delete of recipient state doc as a “retryable write”. It will be part of logical session for 30 minutes. When we receive movePrimaryRecipientSyncData, we check if a prior delete was executed.
- is related to
-
SERVER-72492 Implement commands for movePrimary recipient
- Closed