{"record":{"id":"73ad4b9fde728200","repo":"jaegertracing/jaeger","slug":"compaction-window-should-at-least-be-1-minute","errorCode":null,"errorMessage":"compaction_window should at least be 1 minute","messagePattern":"compaction_window should at least be 1 minute","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/cassandra/config/config.go","lineNumber":210,"sourceCode":"\treturn duration == 0 || duration >= time.Second\n}\n\nfunc (c *Configuration) Validate() error {\n\t_, err := govalidator.ValidateStruct(c)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif !isValidTTL(c.Schema.TraceTTL) {\n\t\treturn errors.New(\"trace_ttl can either be 0 or greater than or equal to 1 second\")\n\t}\n\n\tif !isValidTTL(c.Schema.DependenciesTTL) {\n\t\treturn errors.New(\"dependencies_ttl can either be 0 or greater than or equal to 1 second\")\n\t}\n\n\tif c.Schema.CompactionWindow < time.Minute {\n\t\treturn errors.New(\"compaction_window should at least be 1 minute\")\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":192,"sourceCodeEnd":215,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/internal/storage/cassandra/config/config.go#L192-L215","documentation":"Validate() in the Cassandra storage config requires Schema.CompactionWindow to be at least 1 minute. The compaction window drives time-window-based compaction of trace tables; windows smaller than a minute create too many compaction buckets and are rejected.","triggerScenarios":"Calling Validate on a cassandra.Configuration where c.Schema.CompactionWindow < time.Minute (e.g. 30s) during storage initialization or config validation tests.","commonSituations":"Setting compaction_window in seconds by mistake; small values copied from tuning guides for other systems; programmatically computed durations that round below a minute.","solutions":["Set Schema.CompactionWindow to at least 1 * time.Minute (e.g. 8h for typical deployments).","Review the compaction_window config value for unit errors (must be in minutes or larger).","Use the documented default compaction window if unsure."],"exampleFix":"// before\ncfg.Schema.CompactionWindow = 30 * time.Second\n// after\ncfg.Schema.CompactionWindow = 8 * time.Hour","handlingStrategy":"validation","validationCode":"if cw < time.Minute {\n    return errors.New(\"compaction_window must be at least 1 minute\")\n}","typeGuard":null,"tryCatchPattern":"if err := cfg.Validate(); err != nil {\n    logger.Fatal(\"invalid cassandra config\", zap.Error(err))\n}","preventionTips":["Keep CompactionWindow >= 1 minute (hours are typical).","Watch for seconds-vs-minutes unit mistakes in config.","Call Validate() early at startup so bad windows fail fast."],"tags":["cassandra","config","compaction"],"backgroundTag":"invalid-config-value","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}