Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schedule: enable placement rules cache default #6085

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,12 @@ const (
// DefaultMinResolvedTSPersistenceInterval is the default value of min resolved ts persistent interval.
DefaultMinResolvedTSPersistenceInterval = time.Second

defaultStrictlyMatchLabel = false
defaultEnablePlacementRules = true
defaultEnableGRPCGateway = true
defaultDisableErrorVerbose = true
defaultEnableWitness = false
defaultStrictlyMatchLabel = false
defaultEnablePlacementRules = true
defaultEnablePlacementRulesCache = true
defaultEnableGRPCGateway = true
defaultDisableErrorVerbose = true
defaultEnableWitness = false

defaultDashboardAddress = "auto"

Expand Down Expand Up @@ -1000,7 +1001,7 @@ type ReplicationConfig struct {
// When PlacementRules feature is enabled. MaxReplicas, LocationLabels and IsolationLabels are not used any more.
EnablePlacementRules bool `toml:"enable-placement-rules" json:"enable-placement-rules,string"`

// EnablePlacementRuleCache controls whether use cache during rule checker
// EnablePlacementRulesCache controls whether PD use cache during rule checker
EnablePlacementRulesCache bool `toml:"enable-placement-rules-cache" json:"enable-placement-rules-cache,string"`

// IsolationLevel is used to isolate replicas explicitly and forcibly if it's not empty.
Expand Down Expand Up @@ -1046,6 +1047,9 @@ func (c *ReplicationConfig) adjust(meta *configutil.ConfigMetaData) error {
if !meta.IsDefined("enable-placement-rules") {
c.EnablePlacementRules = defaultEnablePlacementRules
}
if !meta.IsDefined("enable-placement-rules-cache") {
c.EnablePlacementRulesCache = defaultEnablePlacementRulesCache
}
if !meta.IsDefined("strictly-match-label") {
c.StrictlyMatchLabel = defaultStrictlyMatchLabel
}
Expand Down