jaegertracing/jaeger · error
compaction_window should at least be 1 minute
Error message
compaction_window should at least be 1 minute
What it means
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.
Source
Thrown at internal/storage/cassandra/config/config.go:210
return duration == 0 || duration >= time.Second
}
func (c *Configuration) Validate() error {
_, err := govalidator.ValidateStruct(c)
if err != nil {
return err
}
if !isValidTTL(c.Schema.TraceTTL) {
return errors.New("trace_ttl can either be 0 or greater than or equal to 1 second")
}
if !isValidTTL(c.Schema.DependenciesTTL) {
return errors.New("dependencies_ttl can either be 0 or greater than or equal to 1 second")
}
if c.Schema.CompactionWindow < time.Minute {
return errors.New("compaction_window should at least be 1 minute")
}
return nil
}
View on GitHub (pinned to 806f444784)
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.
Example fix
// before cfg.Schema.CompactionWindow = 30 * time.Second // after cfg.Schema.CompactionWindow = 8 * time.Hour
Defensive patterns
Strategy: validation
Validate before calling
if cw < time.Minute {
return errors.New("compaction_window must be at least 1 minute")
} Try / catch
if err := cfg.Validate(); err != nil {
logger.Fatal("invalid cassandra config", zap.Error(err))
} Prevention
- 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.
When it happens
Trigger: Calling Validate on a cassandra.Configuration where c.Schema.CompactionWindow < time.Minute (e.g. 30s) during storage initialization or config validation tests.
Common situations: Setting compaction_window in seconds by mistake; small values copied from tuning guides for other systems; programmatically computed durations that round below a minute.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- trace_ttl can either be 0 or greater than or equal to 1 seco
- dependencies_ttl can either be 0 or greater than or equal to
- no sampling strategy provider specified, expecting 'adaptive
- only one sampling strategy provider can be specified, 'adapt
- reload interval must be a positive value, or zero to disable
AI-assisted analysis of jaegertracing/jaeger@806f444784 (2026-09-01).
Data as JSON: /api/errors/73ad4b9fde728200.
Report an issue: GitHub.