{"record":{"id":"7181d963fe9f587b","repo":"jaegertracing/jaeger","slug":"error-reading-service-names-from-storage-w","errorCode":null,"errorMessage":"error reading service_names from storage: %w","messagePattern":"error reading service_names from storage: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/v1/cassandra/spanstore/service_names.go","lineNumber":97,"sourceCode":"\t// it simply means we might write the same service name twice.\n\tinCache := c.Get(key)\n\tif inCache == nil {\n\t\tc.Put(key, key)\n\t}\n\treturn inCache != nil\n}\n\n// GetServices returns all services traced by Jaeger\nfunc (s *ServiceNamesStorage) GetServices() ([]string, error) {\n\titer := s.session.Query(s.QueryStmt).Iter()\n\n\tvar service string\n\tvar services []string\n\tfor iter.Scan(&service) {\n\t\tservices = append(services, service)\n\t}\n\tif err := iter.Close(); err != nil {\n\t\terr = fmt.Errorf(\"error reading service_names from storage: %w\", err)\n\t\treturn nil, err\n\t}\n\treturn services, nil\n}\n","sourceCodeStart":79,"sourceCodeEnd":102,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/internal/storage/v1/cassandra/spanstore/service_names.go#L79-L102","documentation":"GetServices lists distinct service names from the service_names table; if the gocql iterator returns an error when closed (the query failed during or after scanning), the driver error is wrapped with this message so the caller knows the service-name listing read failed in storage.","triggerScenarios":"Calling GetServices on the service/operation names storage while the underlying SELECT from service_names fails — Cassandra read timeout, node unavailability, or connection error during the scan.","commonSituations":"Cluster under load (timeouts on the small but frequently-hit service_names table); network issues; node restarts; stale schema state after failed migrations.","solutions":["Retry GetServices after checking cluster health; it is a cheap read-only call.","Inspect the wrapped driver error and Cassandra logs for the root cause.","Tune Cassandra read timeouts/retry policy if timeouts are common.","Verify the service_names table exists and is readable (permissions, schema version)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"services, err := reader.GetServices(ctx)\nif err != nil {\n    if strings.Contains(err.Error(), \"error reading service_names\") {\n        // transient read failure: retry with backoff\n    }\n    return err\n}","preventionTips":["Monitor the frequently-hit service_names table for timeouts.","Set sane client timeouts and retries for Cassandra reads.","Verify the table exists post-migration in readiness checks.","Cache the service list briefly in clients to reduce read pressure."],"tags":["cassandra","storage","query","services"],"backgroundTag":"storage-read-failed","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}