Avoid storing db name in two fields of DatabaseName

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • 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.

            Assignee:
            Sophia Tan (Inactive)
            Reporter:
            Sophia Tan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: