Text index metadata path passes the Distributed table name to mergeTreeTextIndex → "There is no index with name ..." (BAD_ARGUMENTS)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #2930 di @Vansh98789 — chiusa senza merge
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- clickhouse, typescript
Direzione di ricerca
Inizia in packages/common-utils/src/core/metadata.ts con le chiamate a getDistributedTableArgs, getSkipIndices e mergeTreeTextIndex intorno alle righe 708, 744, 1204 e 1281, e con partsOverlapFilter intorno alle righe 618-636. Confronta la gestione esistente del cluster e delle tabelle locali in querySkipIndices. Il lavoro è completato quando le origini distribuite usano la tabella locale risolta per le letture dell’indice di testo e il filtraggio delle parti, mentre getMapKeys può passare ai livelli MV o di scansione quando i metadati dell’indice di testo non sono disponibili.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
When a source points at a Distributed table, all metadata queries that use the text-index fast path fail. Index discovery correctly resolves Distributed → local table, but index reads pass the Distributed name to mergeTreeTextIndex(...), which only accepts a MergeTree table.
Version: HyperDX 2.32.0 (also present in 2.34.0 and main), ClickHouse 26.7.3.19, multi-shard cluster.
What happens
Source = observability.otel_traces (Distributed → observability.otel_traces_local, which has INDEX idx_span_attr_items SpanAttributeItems TYPE text(tokenizer = 'array')).
HyperDX generates:
SELECT splitByString('=', token)[1] AS key
FROM mergeTreeTextIndex('observability', 'otel_traces', 'idx_span_attr_items')
WHERE part_name IN (SELECT name FROM system.parts
WHERE database = 'observability' AND table = 'otel_traces' AND active = 1 AND ...)
GROUP BY key HAVING key != '' LIMIT 1000
Code: 36. DB::Exception: There is no index with name 'idx_span_attr_items'. (BAD_ARGUMENTS)
Root cause
In packages/common-utils/src/core/metadata.ts, two places keep the Distributed table name:
mergeTreeTextIndex(databaseName, tableName, index)at L708, L744, L1204, L1281 — whilegetSkipIndicesalready resolves the local table + cluster viagetDistributedTableArgs(#1920, #1944).partsOverlapFilter(L618) filterssystem.partsby the same name — a Distributed table has no parts there, so even with the index name fixed the predicate would be empty.
Impact
The error is only console.warn-ed, so the UI shows nothing — but there is no fallback for the affected columns:
getMapKeysreturns[]from its catch block (L726) instead of falling through to the MV/scan tiers → noSpanAttributes['…']keys in autocomplete or the field picker.determineKeyValueFetchingStrategyassigns one strategy per column, so columns routed to the text index never reach the existing kv rollup MV → no filter values for those columns.- Affects logs too (
otel_logsis Distributed;otel_logs_localhasidx_log_attr_items,idx_res_attr_items,idx_scope_attr_items,idx_trace_id).
Search/filtering still works — the has(SpanAttributeItems, 'key=value') rewrite runs as normal SQL on the shards. Only metadata is broken.
Proposed fix
Use the already-resolved local table and wrap the table function in cluster(), and build partsOverlapFilter on the local table name. Verified on a live 26.7 cluster (returns 277 keys where the current query throws):
SELECT splitByString('=', token)[1] AS key
FROM cluster('{cluster}', mergeTreeTextIndex('observability','otel_traces_local','idx_span_attr_items'))
WHERE part_name IN (SELECT name FROM system.parts
WHERE database = 'observability' AND table = 'otel_traces_local' AND active = 1)
GROUP BY key HAVING key != ''
Passing {cluster} as a literal works — querySkipIndices already relies on it.
Separately, the getMapKeys catch blocks should fall through to the MV/scan tiers instead of returning [], so a text-index failure degrades gracefully.
- Lingua principale
- TypeScript
- Stelle
- 10k
- Fork
- 494
- Merge medio
- 2g 14h
- PR unite (30g)
- 142
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hyperdxio/hyperdx
-
bug external Needs Feedback
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
external
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Replace `as any` mock fixtures in three app test files with shoehornForse già presa @k4its1t l’ha presa 59 giorni fa. Apertagood first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
hyperdxio/hyperdx#2852 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Trace source: document spanLinksValueExpression in the v2 sources external API (OpenAPI parity)Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di hyperdxio/hyperdx
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
chaitin/MonkeyCode#1437 ·
I maintainer di solito rispondono entro 1 giorno
-
rtdb-info-connected-order test: unhandled 'connection is closed' rejection fails the CLI suiteAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
carbon-design-system/carbon-ai-chat#2615 ·
I maintainer di solito rispondono entro 1 giorno
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
redhat-developer/rhdh-plugin-export-overlays#4486 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: fileUploadMatrix.test.ts URL case does a real DNS lookup and fails offlineForse già presa @r2jaff l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ComposioHQ/composio#5054 ·
I maintainer di solito rispondono entro 1 giorno