[SERVER-67155] Serialize and deserialize NamespaceStrings correctly when multitenancySupport enabled Created: 09/Jun/22  Updated: 29/Oct/23  Resolved: 19/Sep/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: Adi Agrawal
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-69818 Complete TODO listed in SERVER-67155 Closed
related to SERVER-70482 Complete TODO listed in SERVER-67155 Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2022-06-27, Server Serverless 2022-07-11, Server Serverless 2022-07-25, Server Serverless 2022-09-19, Server Serverless 2022-10-03
Participants:

 Description   

When multitenancySupport is enabled, but featureFlagRequireTenantId is disabled, the tenantId should be included when serializing a NamespaceString object. If multitenancySupport is enabled AND featureFlagRequireTenantId is enabled, the tenantId should not be included when serializing a NamespaceString object.

When multitenancySupport is enabled but featureFlagRequireTenantId is disabled, we should deserialize a NamespaceString obj using parseFromStringExpectTenantIdInMultitenancyMode(). When both are enabled, we'll need to construct the NamespaceString object using a tenantId passed to the constructor separately.

In this ticket we should write serialize and deserialize methods into a new utilities library that uses the NamespaceString class in order to do this properly. In these functions, let's add an invariant that the tenantId is not initialized when multitenancySupport is disabled. We will also need to write some unit tests to test the serializer/deserializer as producers with various combinations of the flags. There are a number of call sites with TODOs that point to on this ticket that we'll want to repoint to SERVER-69499 since call sites will be modified in that ticket.



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

Author:

{'name': 'Adityavardhan Agrawal', 'email': 'aa729@cornell.edu', 'username': 'Adityav369'}

Message: SERVER-67155: serialize and deserialize namespaceString correctly
Branch: master
https://github.com/mongodb/mongo/commit/14794d91aa3d1aa618de891f99abe0fa9f603a21

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