8000 ua: no application changes needed post migration · Issue #136672 · cockroachdb/cockroach · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
ua: no application changes needed post migration  #136672
Open
@cthumuluru-crdb

Description

@cthumuluru-crdb

Is your feature request related to a problem? Please describe.
Post migration, applications must continue to talk to TenantOne as default tenant and require no specific changes. Currently the default system tenant is the one that maps to tenant name "system". Before migration, tenant {1} hosts both system and user data but post migration system data is moved to tenant {2} and uses the name "system". Without any fixes the application code will break.

Describe the solution you'd like
The default tenant is taken from server.controller.default_target_cluster cluster setting. The fact that we are doing this migration, there is a good chance this setting is not used. Implement fallback logic to make sure the default tenant is the one that has application data.

Additional context

// DefaultTenantSelect determines which tenant serves requests from
// clients that do not specify explicitly the tenant they want to use.
var DefaultTenantSelect = settings.RegisterStringSetting(
settings.SystemOnly,
"server.controller.default_tenant",
"name of the virtual cluster to use when SQL or HTTP clients don't specify a target cluster",
catconstants.SystemTenantName,
settings.WithName(DefaultClusterSelectSettingName),
)

Jira issue: CRDB-45189

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0