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

[recovery] Make replication rollback clear and recover a tenant migration donor's in-memory state

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.8.0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Sharding 2020-10-05

      This ticket is to make mongod clear and recover, on replication rollback, which database prefixes to block/reject requests for.

      • Add a function TenantMigrationAccessBlockerByPrefix::removeAll similar to TenantMigrationAccessBlockerByPrefix::remove, but that clears its entire map
      • Make replication rollback call TenantMigrationAccessBlockerByPrefix::removeAll followed by the recoverTenantMigrationAccessBlockers function added under SERVER-48941 just before where prepared transactions are recovered at the end of rollback

      Similarly to the previous two tickets, this ticket should test that the code works by causing a rollback on a donor node

      • while the migration is in the "blocking" state
      • after the migration has written the "commit" oplog entry but before the commit oplog entry has majority-committed
      • after the migration has written the "abort" oplog entry but before the abort oplog entry has majority-committed

      and confirming that the in-memory state was recovered correctly.

            Assignee:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: