-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
Sharding 2020-09-21
This ticket is to make mongod recover on startup which database prefixes to block/reject operations for.
- Add a function void recoverTenantMigrationAccessBlockers(OperationContext* opCtx) to migrating_tenant_donor_util.cpp that scans config.migrationDonors (see example), and for each doc:
- Creates a TenantMigrationAccessBlocker for that “databasePrefix” and add()'s it to TenantMigrationAccessBlockerByPrefix
- If the doc has "blockTimestamp" set, call startBlockingWrites() and then startBlockingReadsAfter() with the “blockTimestamp” on the TenantMigrationAccessBlocker
- If the doc's state is “commit” , also call commit() on the TenantMigrationAccessBlocker
- If the doc's state is “abort” , also call abort() on the TenantMigrationAccessBlocker
- Call the new recoverTenantMigrationAccessBlockers function just before where prepared transactions are recovered on startup
This ticket should also test that the code works by restarting the donor
- while the migration is in the "blocking" state
- after the migration has committed
- after the migration has aborted
and confirming that the in-memory state was recovered correctly. See tenant_migration_donor_state_machine.js for an example of pausing a migration while it's blocking and checking the donor's in-memory state.
- is depended on by
-
SERVER-50466 [stepup] Test that a new replica set primary resumes tenant migration donations on stepup
- Closed