{"record":{"id":"f71da0f9226b4510","repo":"thanos-io/thanos","slug":"invalid-concurrency-level-d-concurrency-level","errorCode":null,"errorMessage":"invalid concurrency level (%d), concurrency level must be > 0","messagePattern":"invalid concurrency level \\((.+?)\\), concurrency level must be > 0","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/compact/compact.go","lineNumber":1432,"sourceCode":"\tskipBlocksWithOutOfOrderChunks bool\n\tblocksCleaner                  *BlocksCleaner\n}\n\n// NewBucketCompactor creates a new bucket compactor.\nfunc NewBucketCompactor(\n\tlogger log.Logger,\n\tsy *Syncer,\n\tgrouper Grouper,\n\tplanner Planner,\n\tcomp Compactor,\n\tcompactDir string,\n\tbkt objstore.Bucket,\n\tconcurrency int,\n\tskipBlocksWithOutOfOrderChunks bool,\n\tblocksCleaner *BlocksCleaner,\n) (*BucketCompactor, error) {\n\tif concurrency <= 0 {\n\t\treturn nil, errors.Errorf(\"invalid concurrency level (%d), concurrency level must be > 0\", concurrency)\n\t}\n\treturn NewBucketCompactorWithCheckerAndCallback(\n\t\tlogger,\n\t\tsy,\n\t\tgrouper,\n\t\tplanner,\n\t\tcomp,\n\t\tDefaultBlockDeletableChecker{},\n\t\tDefaultCompactionLifecycleCallback{},\n\t\tcompactDir,\n\t\tbkt,\n\t\tconcurrency,\n\t\tskipBlocksWithOutOfOrderChunks,\n\t\tblocksCleaner,\n\t)\n}\n\nfunc NewBucketCompactorWithCheckerAndCallback(","sourceCodeStart":1414,"sourceCodeEnd":1450,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/compact/compact.go#L1414-L1450","documentation":"A parameter-validation guard at the top of NewBucketCompactor: the caller-supplied `concurrency` argument (the number of parallel compaction workers used to run compaction groups) was zero or negative, so the constructor refuses to build a BucketCompactor because there would be no workers to execute the compaction plan. The offending input is the `concurrency int` parameter itself, not any on-disk block state.","triggerScenarios":"Thrown at pkg/compact/compact.go:1432 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set compaction concurrency to at least 1","Fix startup configuration passing 0 or negative values"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}