Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-73705

Design & Implement solution for potential race between online movePrimary commands

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 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.

            Assignee:
            abdul.qadeer@mongodb.com Abdul Qadeer
            Reporter:
            abdul.qadeer@mongodb.com Abdul Qadeer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: