-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105211 from cockroachdb/blathers/backport-release…
…-23.1-105116
- Loading branch information
Showing
11 changed files
with
133 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright 2023 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package multitenant | ||
|
||
import ( | ||
"github.com/cockroachdb/cockroach/pkg/settings" | ||
"github.com/cockroachdb/cockroach/pkg/sql/sem/catconstants" | ||
) | ||
|
||
// DefaultTenantSelectSettingName is the name of the setting that | ||
// configures the default tenant to use when a client does not specify | ||
// a specific tenant. | ||
var DefaultTenantSelectSettingName = "server.controller.default_tenant" | ||
|
||
// 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, | ||
DefaultTenantSelectSettingName, | ||
"name of the tenant to use to serve requests when clients don't specify a tenant", | ||
catconstants.SystemTenantName, | ||
).WithPublic() | ||
|
||
// VerifyTenantService determines whether there should be an advisory | ||
// interlock between changes to the tenant service and changes to the | ||
// above cluster setting. | ||
var VerifyTenantService = settings.RegisterBoolSetting( | ||
settings.SystemOnly, | ||
"server.controller.default_tenant.check_service.enabled", | ||
"verify that a tenant's service is coherently set with the value of "+DefaultTenantSelectSettingName, | ||
true, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters