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
cockroach/pkg/multitenant/tenant_config.go
Lines 20 to 28 in c68c559
Jira issue: CRDB-45189