[SERVER-78261] Avoid too long db name in multitenancy environment Created: 21/Jun/23  Updated: 29/Oct/23  Resolved: 27/Jun/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:
Depends
is depended on by SERVER-77537 Make DatabaseName::db() private Closed
is depended on by SERVER-78263 Serialize db name in the listDatabase... Closed
Related
is related to SERVER-80252 Revert the code change of SERVER-78261 Closed
Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2023-06-26, Server Serverless 2023-07-10
Participants:
Story Points: 1

 Description   

In multitenancy environment, the db name on disk looks like "<tenantId><db>" if tenant prefix exists.  The length of db name should not only include db string size but also include the tenant prefix size and the "".  So, when we validate the db name length in mongod, we should calculate the db name size in the right way. 

In this ticket, we should change the code of database_impl.cpp and database_name.h.  We should also change the jstest files in which the db name is too long (> 38 characters = 63 (max len) - 24 (tenant id string len) - 1).



 Comments   
Comment by Githook User [ 21/Aug/23 ]

Author:

{'name': 'Sophia Tan', 'email': 'sophia_tll@hotmail.com', 'username': 'sophiatll'}

Message: SERVER-80252 Revert the SERVER-78261
Branch: master
https://github.com/mongodb/mongo/commit/60cd957e986e63c32efd16dc3b79cd48253243da

Comment by Githook User [ 03/Jul/23 ]

Author:

{'name': 'Sophia Tan', 'email': 'sophia_tll@hotmail.com', 'username': 'sophiatll'}

Message: SERVER-78261 Avoid too long db name in multitenancy environment
Branch: EVG-17874-taskgen-test
https://github.com/mongodb/mongo/commit/42708edb276835caf0a3131e70aedefc9b050e66

Comment by Githook User [ 27/Jun/23 ]

Author:

{'name': 'Sophia Tan', 'email': 'sophia_tll@hotmail.com', 'username': 'sophiatll'}

Message: SERVER-78261 Avoid too long db name in multitenancy environment
Branch: master
https://github.com/mongodb/mongo/commit/42708edb276835caf0a3131e70aedefc9b050e66

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