jaegertracing/jaeger · error

error reading dependencies from storage: %w

Error message

error reading dependencies from storage: %w

What it means

GetDependencies scans Cassandra rows and, on closing the gocql iterator, surfaces any deferred scan/transport error with this prefix. The error means Cassandra itself failed while reading/iterating dependency rows (query failure, timeout, node issues); the inner error from iter.Close() carries the specific cause.

Source

Thrown at internal/storage/v1/cassandra/dependencystore/storage.go:131

	var mDependency []model.DependencyLink
	var dependencies []Dependency
	var ts time.Time
	for iter.Scan(&ts, &dependencies) {
		for _, dependency := range dependencies {
			dl := model.DependencyLink{
				Parent: dependency.Parent,
				Child:  dependency.Child,
				//nolint:gosec // G115
				CallCount: uint64(dependency.CallCount),
				Source:    dependency.Source,
			}.ApplyDefaults()
			mDependency = append(mDependency, dl)
		}
	}

	if err := iter.Close(); err != nil {
		s.logger.Error("Failure to read Dependencies", zap.Time("endTs", endTs), zap.Duration("lookback", lookback), zap.Error(err))
		return nil, fmt.Errorf("error reading dependencies from storage: %w", err)
	}
	return mDependency, nil
}

func getBuckets(startTs time.Time, endTs time.Time) []time.Time {
	// TODO: Preallocate the array using some maths and maybe use a pool? This endpoint probably isn't used enough to warrant this.
	var tsBuckets []time.Time
	for ts := startTs.Truncate(tsBucket); ts.Before(endTs); ts = ts.Add(tsBucket) {
		tsBuckets = append(tsBuckets, ts)
	}
	return tsBuckets
}

View on GitHub (pinned to 806f444784)

Solutions

  1. Read the wrapped inner error from iter.Close() for the concrete Cassandra failure.
  2. Check Cassandra cluster health (nodetool status) and connectivity from the Jaeger host.
  3. Reduce the lookback window to shrink the scan, and check/raise the client read timeout.
  4. Verify the keyspace schema matches the Jaeger version (unmarshal failures also surface here).
Defensive patterns

Strategy: retry

Validate before calling

if err := session.Query("SELECT now() FROM system.local").Exec(); err != nil {
    return fmt.Errorf("cassandra unavailable: %w", err)
}

Try / catch

deps, err := store.GetDependencies(ctx, endTs, lookback)
if err != nil {
    var netErr net.Error
    if errors.As(err, &netErr) && netErr.Timeout() {
        // retry with backoff or shrink lookback
    }
    return nil, err
}

Prevention

When it happens

Trigger: Calling GetDependencies where the gocql iteration over the dependency SELECT fails — node unreachable mid-scan, query timeout, consistency failure, or unmarshal errors reported at iterator close.

Common situations: Cassandra node down or flapping, network latency to the cluster, read timeouts on large dependency windows, or schema issues surfacing as row-unmarshal failures.

Related errors


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