[SERVER-70432] Change CollectionCloner to be tenant aware Created: 11/Oct/22  Updated: 29/Oct/23  Resolved: 19/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Janna Golden Assignee: Janna Golden
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-70430 Change DatabaseCloner to be tenant aware Closed
Gantt Dependency
has to be done before SERVER-70704 Enable initial sync for the change co... Closed
has to be done before SERVER-71154 Add cluster parameter initial sync te... Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2022-11-14, Server Serverless 2022-11-28
Participants:

 Description   

Construct _sourceDbAndUuid using the DatabaseName object on the sourceNss as opposed to the db string.

We'll need to send the tenantId in any commands run by the cloner -
1. Pass the return value of DatabaseNameUtil::serialize for the dbName for the collStats command. If both multitenancySupport and featureFlagRequireTenantId are enabled, send the tenantId in the $tenant field in the body of the collStats command.
2. To run the count command, the CollectionCloner calls DBClientBase::count. We'll need to correctly serialize the dbName we create from nsOrUuid. In _countCmd, we should set a $tenant field if nsOrUuid has a tenantId on the dbName.
3. The CollectionCloner calls DBClientBase::getIndexSpecs. Similar to the count command, we'll need to correctly serialize the dbName we create in DBClientBase_getIndexSpec, and set a $tenant field if nsOrUuid has a tenantId on the dbName in makeListIndexesCommand. Then, we'll need to correctly deserialize the "ns" field using NamespaceStringUtil::deserialize.



 Comments   
Comment by Githook User [ 19/Nov/22 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-70432 Change CollectionCloner to be tenant aware
Branch: master
https://github.com/mongodb/mongo/commit/eea4d99ade98590e851b84dfa90103b7aa20f74e

Generated at Thu Feb 08 06:16:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.