[SERVER-78262] Create a DatabaseName serialize function for serialization db without tenant prefix Created: 21/Jun/23 Updated: 29/Oct/23 Resolved: 17/Aug/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Sophia Tan | Assignee: | Sophia Tan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | ntdi_must_have | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Serverless
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Server Serverless 2023-06-26 | ||||||||
| Participants: | |||||||||
| Story Points: | 1 | ||||||||
| Description |
|
We are making the DatabaseName::db() private to avoid developers dropping tenant prefix when the tenant prefix is actually required in some use cases. But, there still are some use cases in which tenant prefix is not required, for example:
|
| Comments |
| Comment by Githook User [ 10/Jul/23 ] |
|
Author: {'name': 'Sophia Tan', 'email': 'sophia_tll@hotmail.com', 'username': 'sophiatll'}Message: |
| Comment by Githook User [ 22/Jun/23 ] |
|
Author: {'name': 'Sophia Tan', 'email': 'sophia_tll@hotmail.com', 'username': 'sophiatll'}Message: |
| Comment by Sophia Tan [ 21/Jun/23 ] |
|
Approach 1: Create a SerializationContext and set it to exclude tenant prefix. Serialize the db name with this context and call "DatabaseNameUtil::serializeForCommands(dbName, scExcludePrefix)". This can only be used for command request or reply serialization. There are some other use cases which is not for request/reply. Approach 2: Create a new function "DatabaseName::serializeNonTenantPrefix()". This function can be used for the use cases which are not request/reply serialization. |