-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
Fully Compatible
-
Sharding 2020-10-19, Sharding 2020-11-02
On stepup, the TenantMigrationDonorService should create a TTL index on the local config.migrationDonors collection if a TTL index does not already exist on it.
This could either be done generically in the Primary-Only Service machinery based on the Service's durable state namespace, e.g. in PrimaryOnlyServiceRegistry::onStepUpComplete, or could be done specifically for the TenantMigrationDonorService by overriding PrimaryOnlyService::onStepUp.
This ticket can also update tests that are manually creating the TTL index right now:
$ git grep "createIndex.*expireAt" jstests/replsets/ jstests/replsets/tenant_migration_donor_failover_and_shutdown.js: donorPrimary.getCollection(kConfigDonorsNS).createIndex({expireAt: 1}, {expireAfterSeconds: 0}); jstests/replsets/tenant_migration_donor_state_machine.js:configDonorsColl.createIndex({expireAt: 1}, {expireAfterSeconds: 0});
Putting this in PM-1791 to keep track of it, but it could go into PM-1810.
- depends on
-
SERVER-50406 Add hook for PrimaryOnlyServices to build indexes on stepUp
- Closed
- is depended on by
-
SERVER-49204 Implement donorForgetMigration command
- Closed