[SERVER-54920] Move the tenant migration recipient MTAB lifetime earlier Created: 03/Mar/21  Updated: 29/Oct/23  Resolved: 18/Mar/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Task Priority: Major - P3
Reporter: Andrew Shuvalov (Inactive) Assignee: Lingzhi Deng
Resolution: Fixed Votes: 0
Labels: pm-1791_milestone-B
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-53768 Block TTL deletions on tenant being m... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2021-03-22
Participants:

 Description   

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"



 Comments   
Comment by Githook User [ 18/Mar/21 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-54920: Move the tenant migration recipient MTAB lifetime earlier
Branch: master
https://github.com/mongodb/mongo/commit/3afa5f4fde94a47d8d3ca3743954216c8342f32d

Generated at Thu Feb 08 05:34:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.