{"record":{"id":"df96deef15f8b7b5","repo":"jaegertracing/jaeger","slug":"error-reading-dependencies-from-storage-w","errorCode":null,"errorMessage":"error reading dependencies from storage: %w","messagePattern":"error reading dependencies from storage: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/v1/cassandra/dependencystore/storage.go","lineNumber":131,"sourceCode":"\tvar mDependency []model.DependencyLink\n\tvar dependencies []Dependency\n\tvar ts time.Time\n\tfor iter.Scan(&ts, &dependencies) {\n\t\tfor _, dependency := range dependencies {\n\t\t\tdl := model.DependencyLink{\n\t\t\t\tParent: dependency.Parent,\n\t\t\t\tChild:  dependency.Child,\n\t\t\t\t//nolint:gosec // G115\n\t\t\t\tCallCount: uint64(dependency.CallCount),\n\t\t\t\tSource:    dependency.Source,\n\t\t\t}.ApplyDefaults()\n\t\t\tmDependency = append(mDependency, dl)\n\t\t}\n\t}\n\n\tif err := iter.Close(); err != nil {\n\t\ts.logger.Error(\"Failure to read Dependencies\", zap.Time(\"endTs\", endTs), zap.Duration(\"lookback\", lookback), zap.Error(err))\n\t\treturn nil, fmt.Errorf(\"error reading dependencies from storage: %w\", err)\n\t}\n\treturn mDependency, nil\n}\n\nfunc getBuckets(startTs time.Time, endTs time.Time) []time.Time {\n\t// TODO: Preallocate the array using some maths and maybe use a pool? This endpoint probably isn't used enough to warrant this.\n\tvar tsBuckets []time.Time\n\tfor ts := startTs.Truncate(tsBucket); ts.Before(endTs); ts = ts.Add(tsBucket) {\n\t\ttsBuckets = append(tsBuckets, ts)\n\t}\n\treturn tsBuckets\n}\n","sourceCodeStart":113,"sourceCodeEnd":144,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/internal/storage/v1/cassandra/dependencystore/storage.go#L113-L144","documentation":"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.","triggerScenarios":"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.","commonSituations":"Cassandra node down or flapping, network latency to the cluster, read timeouts on large dependency windows, or schema issues surfacing as row-unmarshal failures.","solutions":["Read the wrapped inner error from iter.Close() for the concrete Cassandra failure.","Check Cassandra cluster health (nodetool status) and connectivity from the Jaeger host.","Reduce the lookback window to shrink the scan, and check/raise the client read timeout.","Verify the keyspace schema matches the Jaeger version (unmarshal failures also surface here)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if err := session.Query(\"SELECT now() FROM system.local\").Exec(); err != nil {\n    return fmt.Errorf(\"cassandra unavailable: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"deps, err := store.GetDependencies(ctx, endTs, lookback)\nif err != nil {\n    var netErr net.Error\n    if errors.As(err, &netErr) && netErr.Timeout() {\n        // retry with backoff or shrink lookback\n    }\n    return nil, err\n}","preventionTips":["Configure gocql timeouts/reconnection policies for your cluster.","Bound the lookback window so scans stay small.","Monitor Cassandra node health and Jaeger's cassandra client metrics."],"tags":["cassandra","storage","network","read-failure"],"backgroundTag":"cassandra-read-failed","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}