Skip to content

Fix -compactor.consistency-delay description #2324

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

Merged
merged 1 commit into from
Jul 5, 2022
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
2 changes: 1 addition & 1 deletion cmd/mimir/config-descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -5486,7 +5486,7 @@
"kind": "field",
"name": "consistency_delay",
"required": false,
"desc": "Minimum age of fresh (non-compacted) blocks before they are being processed. Malformed blocks older than the maximum of consistency-delay and 48h0m0s will be removed.",
"desc": "Minimum age of fresh (non-compacted) blocks before they are being processed.",
"fieldValue": null,
"fieldDefaultValue": 0,
"fieldFlag": "compactor.consistency-delay",
Expand Down
2 changes: 1 addition & 1 deletion cmd/mimir/help-all.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ Usage of ./cmd/mimir/mimir:
-compactor.compactor-tenant-shard-size int
Max number of compactors that can compact blocks for single tenant. 0 to disable the limit and use all compactors.
-compactor.consistency-delay duration
Minimum age of fresh (non-compacted) blocks before they are being processed. Malformed blocks older than the maximum of consistency-delay and 48h0m0s will be removed.
Minimum age of fresh (non-compacted) blocks before they are being processed.
-compactor.data-dir string
Directory to temporarily store blocks during compaction. This directory is not required to be persisted between restarts. (default "./data-compactor/")
-compactor.deletion-delay duration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3559,8 +3559,7 @@ The `compactor` block configures the compactor component.
[meta_sync_concurrency: <int> | default = 20]

# (advanced) Minimum age of fresh (non-compacted) blocks before they are being
# processed. Malformed blocks older than the maximum of consistency-delay and
# 48h0m0s will be removed.
# processed.
# CLI flag: -compactor.consistency-delay
[consistency_delay: <duration> | default = 0s]

Expand Down
6 changes: 1 addition & 5 deletions pkg/compactor/compactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ const (
const (
blocksMarkedForDeletionName = "cortex_compactor_blocks_marked_for_deletion_total"
blocksMarkedForDeletionHelp = "Total number of blocks marked for deletion in compactor."

// PartialUploadThresholdAge is a time after partial block is assumed aborted and ready to be cleaned.
// Keep it long as it is based on block creation time not upload start time.
PartialUploadThresholdAge = 2 * 24 * time.Hour
)

var (
Expand Down Expand Up @@ -127,7 +123,7 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet, logger log.Logger) {
cfg.retryMaxBackoff = time.Minute

f.Var(&cfg.BlockRanges, "compactor.block-ranges", "List of compaction time ranges.")
f.DurationVar(&cfg.ConsistencyDelay, "compactor.consistency-delay", 0, fmt.Sprintf("Minimum age of fresh (non-compacted) blocks before they are being processed. Malformed blocks older than the maximum of consistency-delay and %s will be removed.", PartialUploadThresholdAge))
f.DurationVar(&cfg.ConsistencyDelay, "compactor.consistency-delay", 0, "Minimum age of fresh (non-compacted) blocks before they are being processed.")
f.IntVar(&cfg.BlockSyncConcurrency, "compactor.block-sync-concurrency", 8, "Number of Go routines to use when downloading blocks for compaction and uploading resulting blocks.")
f.IntVar(&cfg.MetaSyncConcurrency, "compactor.meta-sync-concurrency", 20, "Number of Go routines to use when syncing block meta files from the long term storage.")
f.StringVar(&cfg.DataDir, "compactor.data-dir", "./data-compactor/", "Directory to temporarily store blocks during compaction. This directory is not required to be persisted between restarts.")
Expand Down