-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
Fully Compatible
-
Sharding 2020-07-27, Sharding 2020-08-10
In the op observer after being assigned an OpTime (e.g., where this happens for inserts), writes should get the MigratingTenantAccessBlocker for the database they're in from the MigratingTenantAccessBlockerByPrefix and call checkIfCanWriteOrThrow on it.
Note that this should be done in all op observers for user writes, e.g. includes things like collMod, createIndex, and drop.
Test that this works by calling donorStartMigration to put the database's MigratingTenantAccessBlocker into blockWrites and confirming that all writes throw TenantMigrationConflict. (After the migrationConflictRetry loop is added in SERVER-49181, this test will have to be modified to, e.g., send the writes with maxTimeMS and assert that they throw MaxTimeMSExpired.)
- related to
-
SERVER-49834 Handle fsync and fsyncUnlock during tenant migrations
- Closed
-
SERVER-49835 Handle user management and role management commands during tenant migrations
- Closed
-
SERVER-49844 Handle commitTransaction and abortTransaction during tenant migrations
- Closed