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

Make ContinuousTenantMigration hook garbage collect each migration before starting the next one

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 2021-02-22

      After SERVER-53582, the ContinuousTenantMigration hook is expected to no longer work since it cannot start migration rs1 -> rs2 without garbage collecting migration rs0 -> rs1. The reason is that the donor MTAB and recipient MTAB are both stored in the MTABRegistry so it will get ConflictingOperationInProgress error when it tries to start migration rs1 -> rs2. 

       
      It is an overkill to support starting an outgoing migration before garbage collecting last incoming migration for a tenant just to make the hook work since:

      1. Cloud will never run migrations for a tenant so close to each other and without garbage collecting the previous one (although there is nothing illegal with what the hook does).
      2. Given 1, it should be useful to throw an error when we detect that Cloud is trying to start a migration for a tenant without garbage collecting the previous one.

      So the hook should just garbage collect each migration before starting the next one. 

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: