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

XMLWordPrintableJSON

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

      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
            Reporter:
            Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: