[SERVER-70415] Attach $tenant to dbStats command during initial sync Created: 10/Oct/22 Updated: 29/Oct/23 Resolved: 15/Nov/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.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: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Server Serverless 2022-10-17, Server Serverless 2022-10-31, Server Serverless 2022-11-14, Server Serverless 2022-11-28 | ||||||||
| Participants: | |||||||||
| Description |
|
When featureFlagRequireTenantID is enabled, we must send $tenant when sending dbStats for each database that we're cloning. The AllDatabasesCloner will send listDatabasesForAllTenants, but currently we'll just take the name portion of this command to put in the _databases map. As a part of this ticket, change _databases to be a list of DatabaseName objects. We'll need to correctly construct the DatabaseName object to put in the _databases vector - if Then, pass the tenantId to the dbStats command by sending $tenant in the dbStats command body. We'll need to call toStringWithTenantId() on the dbName object in a few places where we construct/interact with DatabaseCloner objects because we haven't yet changed the DatabaseCloner to use a DatabaseName object (i.e. here and here, and likely a few other places in AllDatabaseCloner). Let's also add a unit test similar to this one to check that this works when multitenancySupport and featureFlagRequireTenantID are enabled. Also, let's add tests with our flags that check that admin is still first, and local is removed properly like these two - currently, we don't use the system tenantId yet, but we will eventually and so it will be good to check that we still sort/filter correctly. |
| Comments |
| Comment by Githook User [ 15/Nov/22 ] |
|
Author: {'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}Message: |
| Comment by Githook User [ 15/Nov/22 ] |
|
Author: {'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}Message: |