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

When abortTenantIndexBuilds failed to abort during a tenant migration, we should wait for the createIndex to finish before continuing the MTM



    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.3.0
    • 5.1.0
    • None
    • None
    • Fully Compatible
    • ALL
    • Server Serverless 2021-12-27, Server Serverless 2022-01-10, Server Serverless 2022-01-24, Server Serverless 2022-02-07
    • 15


      We found out that when the tenant_migration_donor_service calls to abort the index build, we end up not aborting the index build because of the current state of the createIndex which here was kCommitQuorumSatisfied

      We should handle when IndexBuildsCoordinator::abortTenantIndexBuilds calls 
      abortIndexBuildByBuildUUID and returns false, we should propagate that failure in order to then abort the tenant migration for that reason. We should also use the reason parameter in order to give more information in the log line.

      It was decided instead we should wait for the indexBuilds to finish unregistering the index build. There could be a race condition where we would return committed but the index build hasn't unregistered yet and this could be an issue too.

      The solution to this is to always wait for the unregisterIndexBuild to finish.
      We should also take this opportunity to give more details in the logs to help diagnose this type of issues / failures.

      In addition to this we will also handle that case to not be an error in the tenant_migration.py hook here : SERVER-62154




            mathis.bessa@mongodb.com Mathis Bessa
            mathis.bessa@mongodb.com Mathis Bessa
            0 Vote for this issue
            6 Start watching this issue