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

Race in RecipientForgetMigration_WaitUntilStateDocInitialized

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Repl 2021-01-25
    • 0

      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.

            Assignee:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: