{"record":{"id":"e81f0fad6e4e2e6a","repo":"SigNoz/signoz","slug":"no-index-table-supplied","errorCode":null,"errorMessage":"no index table supplied","messagePattern":"no index table supplied","errorType":"exception","errorClass":"error","httpStatus":null,"severity":"error","filePath":"pkg/query-service/app/clickhouseReader/reader.go","lineNumber":119,"sourceCode":"\n\tsignozTSTableNameV4Reduced = \"distributed_time_series_v4_reduced\"\n\n\tsignozTableAttributesMetadata      = \"distributed_attributes_metadata\"\n\tsignozLocalTableAttributesMetadata = \"attributes_metadata\"\n\n\tsignozUpdatedMetricsMetadataLocalTable = \"updated_metadata\"\n\tsignozUpdatedMetricsMetadataTable      = \"distributed_updated_metadata\"\n\tminTimespanForProgressiveSearch        = time.Hour\n\tminTimespanForProgressiveSearchMargin  = time.Minute\n\tmaxProgressiveSteps                    = 4\n\tcharset                                = \"abcdefghijklmnopqrstuvwxyz\" +\n\t\t\"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"\n\tNANOSECOND = 1000000000\n)\n\nvar (\n\tErrNoOperationsTable            = errors.New(\"no operations table supplied\")\n\tErrNoIndexTable                 = errors.New(\"no index table supplied\")\n\tErrStartTimeRequired            = errors.New(\"start time is required for search queries\")\n\tseededRand           *rand.Rand = rand.New(\n\t\trand.NewSource(time.Now().UnixNano()))\n)\n\n// SpanWriter for reading spans from ClickHouse\ntype ClickHouseReader struct {\n\tdb                      clickhouse.Conn\n\tprometheus              prometheus.Prometheus\n\tsqlDB                   sqlstore.SQLStore\n\tTraceDB                 string\n\toperationsTable         string\n\tdurationTable           string\n\tindexTable              string\n\terrorTable              string\n\tusageExplorerTable      string\n\tSpansTable              string\n\tspanAttributeTableV2    string","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/SigNoz/signoz/blob/5069bf80b08f1f00d7e014eccc09902f9871004f/pkg/query-service/app/clickhouseReader/reader.go#L101-L137","documentation":"ErrNoIndexTable is a sentinel error returned (e.g. by GetServices) when the ClickHouse reader has no index table configured, so span/index-backed queries can't be executed.","triggerScenarios":"Calling GetServices (or any index-table-dependent reader method) with an empty indexTable configuration on the ClickHouseReader.","commonSituations":"Deploying the query service without the SIGNOZ_TRACE_INDEX / index table env var; pointing at a ClickHouse cluster where the distributed index table wasn't created; upgrading to a version that renamed index tables.","solutions":["Configure the index table name (e.g. SIGNOZ_TRACE_INDEX env var / config field) for the query service","Ensure the corresponding distributed table exists in ClickHouse (check schema migrations)","Restart the query service after fixing config so the reader is rebuilt with the table name"],"exampleFix":"// before\nSIGNOZ_TRACE_INDEX=\"\"\n// after\nSIGNOZ_TRACE_INDEX=\"distributed_signoz_index_v2\"","handlingStrategy":"validation","validationCode":"if indexTable == \"\" {\n    log.Fatal(\"index table must be configured (SIGNOZ_TRACE_INDEX)\")\n}\nreader := NewClickHouseReader(conn, operationsTable, indexTable)","typeGuard":null,"tryCatchPattern":"_, err := reader.GetServices(ctx, params)\nif errors.Is(err, clickhouseReader.ErrNoIndexTable) {\n    // fix env/config, verify table exists, restart\n}","preventionTips":["Assert required table env vars in deployment manifests","Verify distributed index table exists after ClickHouse upgrades"],"tags":["config","clickhouse","query-service","missing-table"],"backgroundTag":"missing-env-var","analyzedSha":"5069bf80b08f1f00d7e014eccc09902f9871004f","analyzedAt":"2026-08-28T06:22:12.824Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}