Text index metadata path passes the Distributed table name to mergeTreeTextIndex → "There is no index with name ..." (BAD_ARGUMENTS)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
- #2930 của @Vansh98789 — đã đóng, không merge
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- clickhouse, typescript
Hướng nghiên cứu
Bắt đầu trong packages/common-utils/src/core/metadata.ts với các lệnh gọi getDistributedTableArgs, getSkipIndices và mergeTreeTextIndex quanh các dòng 708, 744, 1204 và 1281, cùng với partsOverlapFilter quanh các dòng 618-636. So sánh cách xử lý cluster và bảng cục bộ hiện có trong querySkipIndices. Hoàn thành khi các nguồn Distributed sử dụng bảng cục bộ đã được phân giải cho việc đọc chỉ mục văn bản và lọc parts, trong khi getMapKeys có thể chuyển xuống các tầng MV hoặc scan khi metadata của chỉ mục văn bản bị lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 10.1k
- Fork
- 527
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 186
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ClickHouse/ClickStack
-
external
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ClickHouse/ClickStack#3761 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Metric chart with aggFn increase and a multi-column group-by fails: toString() gets several argumentsCó thể đã có người làm @CG-5228 đã nhận 26 ngày trước. Đang mởexternal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ClickHouse/ClickStack#3477 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Slack notifications for inline alerts fail when the chart-explorer link passes Slack's 3000-character block limitCó thể đã có người làm @Tyagiquamar đã nhận 27 ngày trước. Đang mởalerting bug external
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ClickHouse/ClickStack#3452 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
check-alerts worker: 13 error spans (mongodb.create, NamespaceExists) every minute because mongoose autoCreate is still onCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug external Needs Feedback
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ClickHouse/ClickStack#3308 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
count_distinct aggFn on metric tiles ignores valueExpression, always counts distinct metric ValuesCó thể đã có người làm @Harshul1484 đã nhận 54 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ClickHouse/ClickStack#2311 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ClickHouse/ClickStack
Issue tương tự
-
Add: GTrekkerĐang mởcheck:passed streams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ui Bug Payload OSS
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
payloadcms/payload#19839 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(auth): add the email OTP verification step to Pollar loginCó thể đã có người làm @akansnoro đã nhận hôm nay. Đang mởStellar Wave
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
safetrustcr/dApp-SafeTrust#584 · 10 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The manager preset saves launch definitions without the required file and digest pairCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày