Skip to content

Commit

Permalink
Nit
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Jung <[email protected]>
  • Loading branch information
justinjung04 committed Jan 24, 2025
1 parent d626716 commit a92e069
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions docs/configuration/config-file-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3549,10 +3549,6 @@ The `limits_config` configures default and per-tenant limits imposed by Cortex s
# zones are not available.
[query_partial_data: <boolean> | default = false]

# Enable to allow rules to be evaluated with data from a single zone, if other
# zones are not available.
[rules_partial_data: <boolean> | default = false]

# Maximum number of outstanding requests per tenant per request queue (either
# query frontend or query scheduler); requests beyond this error with HTTP 429.
# CLI flag: -frontend.max-outstanding-requests-per-tenant
Expand Down Expand Up @@ -3613,6 +3609,10 @@ query_rejection:
# external labels for alerting rules
[ruler_external_labels: <map of string (labelName) to string (labelValue)> | default = []]

# Enable to allow rules to be evaluated with data from a single zone, if other
# zones are not available.
[rules_partial_data: <boolean> | default = false]

# The default tenant's shard size when the shuffle-sharding strategy is used.
# Must be set when the store-gateway sharding is enabled with the
# shuffle-sharding strategy. When this setting is specified in the per-tenant
Expand Down
12 changes: 6 additions & 6 deletions pkg/util/validation/limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ type Limits struct {
MaxQueriersPerTenant float64 `yaml:"max_queriers_per_tenant" json:"max_queriers_per_tenant"`
QueryVerticalShardSize int `yaml:"query_vertical_shard_size" json:"query_vertical_shard_size" doc:"hidden"`
QueryPartialData bool `yaml:"query_partial_data" json:"query_partial_data" doc:"nocli|description=Enable to allow queries to be evaluated with data from a single zone, if other zones are not available.|default=false"`
RulesPartialData bool `yaml:"rules_partial_data" json:"rules_partial_data" doc:"nocli|description=Enable to allow rules to be evaluated with data from a single zone, if other zones are not available.|default=false"`

// Query Frontend / Scheduler enforced limits.
MaxOutstandingPerTenant int `yaml:"max_outstanding_requests_per_tenant" json:"max_outstanding_requests_per_tenant"`
Expand All @@ -188,6 +187,7 @@ type Limits struct {
RulerMaxRuleGroupsPerTenant int `yaml:"ruler_max_rule_groups_per_tenant" json:"ruler_max_rule_groups_per_tenant"`
RulerQueryOffset model.Duration `yaml:"ruler_query_offset" json:"ruler_query_offset"`
RulerExternalLabels labels.Labels `yaml:"ruler_external_labels" json:"ruler_external_labels" doc:"nocli|description=external labels for alerting rules"`
RulesPartialData bool `yaml:"rules_partial_data" json:"rules_partial_data" doc:"nocli|description=Enable to allow rules to be evaluated with data from a single zone, if other zones are not available.|default=false"`

// Store-gateway.
StoreGatewayTenantShardSize float64 `yaml:"store_gateway_tenant_shard_size" json:"store_gateway_tenant_shard_size"`
Expand Down Expand Up @@ -733,11 +733,6 @@ func (o *Overrides) QueryPartialData(userID string) bool {
return o.GetOverridesForUser(userID).QueryPartialData
}

// RulesPartialData returns whether rule may be evaluated with data from a single zone, if other zones are not available.
func (o *Overrides) RulesPartialData(userID string) bool {
return o.GetOverridesForUser(userID).RulesPartialData
}

// MaxQueryParallelism returns the limit to the number of split queries the
// frontend will process in parallel.
func (o *Overrides) MaxQueryParallelism(userID string) int {
Expand Down Expand Up @@ -857,6 +852,11 @@ func (o *Overrides) RulerQueryOffset(userID string) time.Duration {
return ruleOffset
}

// RulesPartialData returns whether rule may be evaluated with data from a single zone, if other zones are not available.
func (o *Overrides) RulesPartialData(userID string) bool {
return o.GetOverridesForUser(userID).RulesPartialData
}

// StoreGatewayTenantShardSize returns the store-gateway shard size for a given user.
func (o *Overrides) StoreGatewayTenantShardSize(userID string) float64 {
return o.GetOverridesForUser(userID).StoreGatewayTenantShardSize
Expand Down

0 comments on commit a92e069

Please sign in to comment.