jaegertracing/jaeger · error
invalid version
Error message
invalid version
What it means
errInvalidVersion is declared in internal/storage/v1/cassandra/dependencystore/storage.go and returned by NewDependencyStore when the caller requests a dependency-store table version the package does not implement. The store supports versioned schemas (e.g. the v2 table 'dependencies_v2' referenced by depsSelectStmtV2), so NewDependencyStore takes a version parameter to pick the right statements. Any version outside the supported set cannot be mapped to a known table/queries, so construction fails fast instead of issuing queries against a non-existent table.
Source
Thrown at internal/storage/v1/cassandra/dependencystore/storage.go:46
const (
// V1 is used when the dependency table is SASI indexed.
V1 Version = iota
// V2 is used when the dependency table is NOT SASI indexed.
V2
versionEnumEnd
depsInsertStmtV1 = "INSERT INTO dependencies(ts, ts_index, dependencies) VALUES (?, ?, ?)"
depsInsertStmtV2 = "INSERT INTO dependencies_v2(ts, ts_bucket, dependencies) VALUES (?, ?, ?)"
depsSelectStmtV1 = "SELECT ts, dependencies FROM dependencies WHERE ts_index >= ? AND ts_index < ?"
depsSelectStmtV2 = "SELECT ts, dependencies FROM dependencies_v2 WHERE ts_bucket IN ? AND ts >= ? AND ts < ?"
// TODO: Make this customizable.
tsBucket = 24 * time.Hour
)
var errInvalidVersion = errors.New("invalid version")
// DependencyStore handles all queries and insertions to Cassandra dependencies
type DependencyStore struct {
session cassandra.Session
dependenciesTableMetrics *casmetrics.Table
logger *zap.Logger
version Version
}
// NewDependencyStore returns a DependencyStore
func NewDependencyStore(
session cassandra.Session,
metricsFactory metrics.Factory,
logger *zap.Logger,
version Version,
) (*DependencyStore, error) {
if !version.IsValid() {
return nil, errInvalidVersionView on GitHub (pinned to 806f444784)
Solutions
- Check the version argument passed to NewDependencyStore and set it to a supported value (the latest version the code declares, e.g. 2 for the dependencies_v2 table).
- If the version comes from configuration, validate/clamp it at config-load time before reaching NewDependencyStore.
- If you intend to use a newer table version, upgrade the Jaeger binary to one whose dependencystore package supports that version.
- If you believe the version should be supported, inspect storage.go for the switch over version constants and add support in a code change with tests.
Example fix
// before store, err := dependencystore.NewDependencyStore(session, logger, metrics, 3) // invalid // after store, err := dependencystore.NewDependencyStore(session, logger, metrics, 2)
Defensive patterns
Strategy: validation
Validate before calling
const maxDepStoreVersion = 2 // check storage.go for supported versions
if v < 1 || v > maxDepStoreVersion {
return nil, fmt.Errorf("dependency store version %d not supported", v)
} Try / catch
store, err := dependencystore.NewDependencyStore(session, logger, metrics, cfg.Version)
if err != nil {
return fmt.Errorf("constructing dependency store: %w", err)
} Prevention
- Derive the version from a named constant in the package, never a raw literal or raw config pass-through.
- Validate the configured version at config-load time with a whitelist.
When it happens
Trigger: Calling cassandra dependencystore.NewDependencyStore with a version argument that is not one of the supported constants (e.g. passing 3 or 0 when only 1 and 2 are supported), or wiring a config value straight into that parameter without normalizing it.
Common situations: A storage backend config carries an unknown or stale 'dependency store version' value (hand-edited YAML, version bumped for a future release before this binary supports it, or an operator copying config from a newer Jaeger version); tests or plugins constructing the store programmatically with a wrong literal.
Related errors
- unsupported schema version: %v
- query exists in template without ";"
- only one of TagIndexBlacklist and TagIndexWhitelist can be s
- failed to obtain purger: %w
- failed to Exec query '%s': %w
AI-assisted analysis of jaegertracing/jaeger@806f444784 (2026-09-01).
Data as JSON: /api/errors/677fd7669e92ce23.
Report an issue: GitHub.