cockroachdb / cockroachdb/cockroach

ua: no application changes needed post migration

Open
#136,672 0 comments 0 reactions 0 assignees View on GitHub
C-enhancement
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**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**

https://github.com/cockroachdb/cockroach/blob/c68c559859be738efead9971f5e11f62a8c69d06/pkg/multitenant/tenant_config.go#L20-L28

Jira issue: CRDB-45189

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.