-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Db name of the database is stored in two fields of DatabaseName.
- _dbName, it holds the db name
- _tenantDbName, it holds the tenant id and db name in one string when a tenant id is assigned.
In this ticket, we will redesign the internal data struct to have the db name only be stored in one place, such as _name. This field will hold a string with
- <tenant id>_<db name>, if tenant id is assigned.
- <db name>, otherwise.
Also, add a field to store the start index of db name and change the implementations of related functions, for example
StringData dbName() {
return StringData(_name.c_str() + _dbIndex, _tenantDbName.size());
}
As a part of this ticket, also remove createSystemTenantDbName - we are not currently using it anywhere and it breaks convention as it takes in a string without a tenantId or a separate tenantId param.
- duplicates
-
SERVER-66963 Improve performance of NamespaceString and DatabaseName construction
- Closed