Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions docs/configuration/config-file-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2833,6 +2833,11 @@ lifecycler:
# CLI flag: -ingester.num-tokens
[num_tokens: <int> | default = 128]

# EXPERIMENTAL: Algorithm used to generate new ring tokens. Supported Values:
# random,minimize-spread
# CLI flag: -ingester.tokens-generator-strategy
[tokens_generator_strategy: <string> | default = "random"]

# Period at which to heartbeat to consul. 0 = disabled.
# CLI flag: -ingester.heartbeat-period
[heartbeat_period: <duration> | default = 5s]
Expand Down
7 changes: 2 additions & 5 deletions pkg/ring/lifecycler.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type LifecyclerConfig struct {

// Config for the ingester lifecycle control
NumTokens int `yaml:"num_tokens"`
TokensGeneratorStrategy string `yaml:"tokens_generator_strategy" doc:"hidden"`
TokensGeneratorStrategy string `yaml:"tokens_generator_strategy"`
HeartbeatPeriod time.Duration `yaml:"heartbeat_period"`
ObservePeriod time.Duration `yaml:"observe_period"`
JoinAfter time.Duration `yaml:"join_after"`
Expand Down Expand Up @@ -70,7 +70,7 @@ func (cfg *LifecyclerConfig) RegisterFlagsWithPrefix(prefix string, f *flag.Flag
}

f.IntVar(&cfg.NumTokens, prefix+"num-tokens", 128, "Number of tokens for each ingester.")
f.StringVar(&cfg.TokensGeneratorStrategy, prefix+"tokens-generator-strategy", randomTokenStrategy, fmt.Sprintf("Algorithm used to generate new tokens. Supported Values: %s", strings.Join(supportedTokenStrategy, ",")))
f.StringVar(&cfg.TokensGeneratorStrategy, prefix+"tokens-generator-strategy", randomTokenStrategy, fmt.Sprintf("EXPERIMENTAL: Algorithm used to generate new ring tokens. Supported Values: %s", strings.Join(supportedTokenStrategy, ",")))
f.DurationVar(&cfg.HeartbeatPeriod, prefix+"heartbeat-period", 5*time.Second, "Period at which to heartbeat to consul. 0 = disabled.")
f.DurationVar(&cfg.JoinAfter, prefix+"join-after", 0*time.Second, "Period to wait for a claim from another member; will join automatically after this.")
f.DurationVar(&cfg.ObservePeriod, prefix+"observe-period", 0*time.Second, "Observe tokens after generating to resolve collisions. Useful when using gossiping ring.")
Expand Down Expand Up @@ -176,9 +176,6 @@ func NewLifecycler(
}

zone := cfg.Zone
if zone != "" {
level.Warn(logger).Log("msg", "experimental feature in use", "feature", "Zone aware replication")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we need to clean up other doc in Cortex website?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we can clean up all in another pr

}

// We do allow a nil FlushTransferer, but to keep the ring logic easier we assume
// it's always set, so we use a noop FlushTransferer
Expand Down