-
[OPIK-4828] [BE] Fix thread view shows no data message but then eventually loads (#5954)
发布于
2026-04-01 09:08:48 +00:00 - [OPIK-4828] [FE] fix: prevent No Data flash and stale thread data in ThreadDetailsPanel
- Remove keepPreviousData from useThreadById and useTracesList to avoid
showing the previous thread's data when switching between threads - Change && to || in renderContent loading check so that a Loader is
shown whenever either query is pending, not only when both are pending
simultaneously (which caused No Data to appear if traces resolved first)
- feat(db): add bloom filter skip index on traces.thread_id
OPIK-4828: thread_id had no skip index, causing full partition scans
when filtering traces by thread in the thread view. The bloom filter
at 1% false positive rate allows ClickHouse to skip ~99% of irrelevant
granules for thread_id lookups.- fix(threads): enable skip index on FINAL scan in findById query
Add SETTINGS use_skip_indexes_if_final = 1 so the bloom filter on
traces.thread_id is applied even when reading with FINAL, allowing
ClickHouse to skip irrelevant granules during thread view loading.- [OPIK-4828] [BE] perf: remove FINAL from append-only feedback score tables in thread queries
Remove FINAL modifier from feedback_scores and authored_feedback_scores
reads across all thread DAO queries. authored_feedback_scores is
append-only so FINAL is unnecessary overhead; feedback_scores reads are
deduplicated via ROW_NUMBER() window function downstream so FINAL is
also redundant.Also optimise SELECT_TRACES_THREAD_BY_ID with a two-phase CTE approach:
narrow to matching trace IDs first (with FINAL), then read full rows
without FINAL using LIMIT 1 BY for deduplication. Benchmarked ~5x
faster on production for threads with large trace counts.-
Fix issue
-
fix(threads): remove trailing whitespace in ThreadDAO SQL queries
-
[OPIK-4828] [BE] Address PR review: move use_skip_indexes_if_final to global config, fix redundant dedup
-
[OPIK-4828] [BE] Remove remaining per-query use_skip_indexes_if_final settings
-
Fix tests
-
Update and rename 000076_add_thread_id_skip_index_to_traces.sql to 000077_add_thread_id_skip_index_to_traces.sql
下载附件