jaegertracing/jaeger · error

dependencies_ttl can either be 0 or greater than or equal to

Error message

dependencies_ttl can either be 0 or greater than or equal to 1 second

What it means

Validate() in the Cassandra storage config rejects a Schema.DependenciesTTL that is neither 0 nor at least 1 second. Like trace_ttl, the dependencies TTL must be disabled (0) or a whole number of seconds or greater, because Cassandra schema TTLs cannot express sub-second durations.

Source

Thrown at internal/storage/cassandra/config/config.go:206

	return fmt.Sprintf("%+v", *c)
}

func isValidTTL(duration time.Duration) bool {
	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

  1. Set Schema.DependenciesTTL to >= 1 * time.Second (commonly several days, e.g. 504h).
  2. Set it to 0 to disable dependencies TTL management.
  3. Double-check the duration string/unit in the configuration source.

Example fix

// before
cfg.Schema.DependenciesTTL = 100 * time.Millisecond
// after
cfg.Schema.DependenciesTTL = 504 * time.Hour
Defensive patterns

Strategy: validation

Validate before calling

if ttl != 0 && ttl < time.Second {
    return errors.New("dependencies_ttl must be 0 or >= 1s")
}

Try / catch

if err := cfg.Validate(); err != nil {
    logger.Fatal("invalid cassandra config", zap.Error(err))
}

Prevention

When it happens

Trigger: Calling Validate on a cassandra.Configuration where c.Schema.DependenciesTTL is strictly between 0 and 1 second (e.g. 100ms), during storage extension start or config tests.

Common situations: Sub-second dependencies_ttl from a misread YAML duration; env parsing producing small durations; copying trace_ttl tuning patterns to dependencies_ttl with wrong units.

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


AI-assisted analysis of jaegertracing/jaeger@806f444784 (2026-09-01). Data as JSON: /api/errors/949c4666be4e61f0. Report an issue: GitHub.