|
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.
|