{"record":{"id":"989dc194378433db","repo":"jaegertracing/jaeger","slug":"error-reading-operation-names-from-storage-w","errorCode":null,"errorMessage":"error reading operation_names from storage: %w","messagePattern":"error reading operation_names from storage: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/v1/cassandra/spanstore/operation_names.go","lineNumber":174,"sourceCode":"\terr := query.Exec()\n\treturn err == nil\n}\n\nfunc getOperationsV1(\n\ts *OperationNamesStorage,\n\tquery tracestore.OperationQueryParams,\n) ([]tracestore.Operation, error) {\n\titer := s.session.Query(s.table.queryStmt, query.ServiceName).Iter()\n\n\tvar operation string\n\tvar operations []tracestore.Operation\n\tfor iter.Scan(&operation) {\n\t\toperations = append(operations, tracestore.Operation{\n\t\t\tName: operation,\n\t\t})\n\t}\n\tif err := iter.Close(); err != nil {\n\t\terr = fmt.Errorf(\"error reading operation_names from storage: %w\", err)\n\t\treturn nil, err\n\t}\n\n\treturn operations, nil\n}\n\nfunc getOperationsV2(\n\ts *OperationNamesStorage,\n\tquery tracestore.OperationQueryParams,\n) ([]tracestore.Operation, error) {\n\tvar casQuery cassandra.Query\n\tif query.SpanKind == \"\" {\n\t\t// Get operations for all spanKind\n\t\tcasQuery = s.session.Query(s.table.queryStmt, query.ServiceName)\n\t} else {\n\t\t// Get operations for given spanKind\n\t\tcasQuery = s.session.Query(s.table.queryByKindStmt, query.ServiceName, query.SpanKind)\n\t}","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/internal/storage/v1/cassandra/spanstore/operation_names.go#L156-L192","documentation":"getOperationsV1 scans all rows from the legacy operation_names table via gocql's iterator; if iter.Close() returns an error (query failed mid-scan, timeout, node down), the raw driver error is wrapped with this message to give context about which read failed.","triggerScenarios":"Calling GetOperations (SpanReader) against a keyspace on schema version 1 (operation_names table) while the underlying Cassandra query fails — coordinator timeout, node unavailability, tombstone/gc_grace issues during a full-scan query.","commonSituations":"Cassandra cluster under load causing read timeouts on the unbucketed v1 table; network blips between Jaeger and Cassandra; large per-service operation lists hitting read timeouts.","solutions":["Check Cassandra logs / system.traces for the underlying read failure (timeouts, unavailable) and address cluster health.","Upgrade the schema to operation_names_v2 (run latest schema script), which is bucketed and less timeout-prone.","Retry the GetServices/GetOperations call once the cluster recovers; it is a read-only operation.","Tune Cassandra client timeouts/retry policy in the Jaeger storage configuration if timeouts are frequent."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"ops, err := reader.GetOperations(ctx, tracestore.OperationQuery{ServiceName: svc})\nif err != nil {\n    if strings.Contains(err.Error(), \"error reading operation_names\") {\n        // transient Cassandra read failure: backoff and retry\n    }\n    return err\n}","preventionTips":["Monitor Cassandra read timeout metrics and alert on spikes.","Migrate to operation_names_v2 (bucketed) schema for less timeout-prone reads.","Size the cluster for the service/operation cardinality.","Use conservative client timeouts with a retry-enabled gocql policy."],"tags":["cassandra","storage","query","iterator"],"backgroundTag":"storage-read-failed","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}