[SERVER-70913] Investigate changes needed to ShardSplit code in order to use TenantId/DatabaseName objects Created: 27/Oct/22  Updated: 29/Oct/23  Resolved: 08/Nov/22

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

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

Issue Links:
Related
is related to SERVER-71179 Update the ShardSplitCommands to use ... Closed
is related to SERVER-71184 Shard Split State Document to use arr... Closed
is related to SERVER-71186 Tenant migration access blocker regis... Closed
is related to SERVER-71187 Index Build Coordinator to use Tenant... Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2022-11-14
Participants:

 Description   

Currently, ShardSplit passes around tenantIds and dbNames as strings. This ticket is to investigate where we'll need to make changes and track all of these changes (i.e. the commitShardSplit command, state doc, access blockers, inject_tenant_prefix.js override), and then propose a plan for how we should approach making these changes.



 Comments   
Comment by Mathis Bessa [ 08/Nov/22 ]

There was no code change for this ticket.

Comment by Mathis Bessa [ 08/Nov/22 ]

As part of the NTDI changes to affect the Shard Split we should make the following changes in any order (and / or in parallel) :

  • Change the Shard Split Commands (commitShardSplit) to use a vector<tenant_id> instead of vector<string>. Part of the change could include a couple helper methods to convert a vector<tenant_id> to a vector<string> (StringData) and vector<string> to a vector<tenant_id>. We should also change the javascript code to support the change in the parameter. Also making necessary changes at the shard_split_test api. We should also make changes to the shard split passthrough to also support the proper object if necessary.
  • Change the Shard Split State Document to use a vector<tenant_id> instead of vector<string>. This should contain the changes for the shard_split_donor_service, shard_split_donor_op_observer. There might be some conflicts with the tenant_migration_access_blocker_registry which should be addressed in a different ticket, in the meantime we can have a temporary conversion from tenant_id to StringData. We should also make changes to all the unit tests and jstests if necessary (we do not seem to access the tenantIds from the state doc in our jstests).
  • Change the tenant_migration_access_blocker_util and the tenant_migration_access_blocker_registry to use a vector<tenant_id> instead of the vector<string> and all other places where we use StringData instead of a TenantId object. The unit tests should also be changed. In case of this ticket done asynchronously we should have support for both TenantId object and StringData until the other tickets are done. We can either mark the change blocked + depend on; or we can create a TODO ticket to delete the old api still using StringData over TenantId.
  • Changes to the index_build_coordinator will be necessary. It seems the work within has already been done since we are using the TenantId object however we do not use it in the header and this change should address that.
Generated at Thu Feb 08 06:17:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.