-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
Sharding 2021-03-22
This is needed to close the corner case of TTL cleanup in SERVER-53768. The TTL cycle is suspended in presence of MTAB, but today MTAB is created only when the 1st clone is done. This will allow to keep the TTL logic very simple.
Caveat, as discussed:
"Matthew Russotto:
If we create the mtab early we will need to make sure when we read the local database that we set the tenantMigration flag on the opCtx (we don't do that now, I don't think). The cloner needs to write; if it has that flag set when it does, its oplog writes will have the migration UUID (not sure if that's a problem, though), so if we don't want it do, we'll need to add some bits."
"Lingzhi Deng:
I dont think we need to worry about other writes. But I agree with Matthew that we will need to be careful with reads from the cloner, e.g. https://github.com/mongodb/mongo/blob/8cfccd21f2f06bf93345ad25b3ca0a9af489b0e2/src/mongo/db/repl/tenant_collection_cloner.cpp#L325-L357
To do that, we could set tenantMigrationRecipientInfo(opCtx) on the opCtx and exempt that in the recipient mtab"
- is depended on by
-
SERVER-53768 Block TTL deletions on tenant being migrated on recipient until the migration is forgotten
- Closed