-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Area
Backend — Database / Migrations
Category
Test coverage
Description
The clickhouse package has the best test coverage in the backend (~2,450 lines of tests) but still has significant gaps in the 7,800+ LOC codebase.
Coverage gaps:
- Query builder SQL generation with complex filters — limited edge case testing
- Sampling table selection logic (>20M row threshold)
- Write operations (batch insert correctness for all 5 data streams)
- Connection failover (read-only connection fallback)
- Migration idempotency verification
Structural concerns:
query.gois 2,181 lines — largest file in the backend. Should be split by data stream.- 146 migrations with no rollback testing
- Timestamp precision mismatch: logs (seconds) vs traces (nanoseconds)
See src/backend/clickhouse/MODULE.md for full analysis.
Affected Files / Packages
src/backend/clickhouse/query.go (2,181 lines — needs splitting)
src/backend/clickhouse/sessions.go (943 lines)
src/backend/clickhouse/errors.go (881 lines)
src/backend/clickhouse/traces.go (678 lines)
src/backend/clickhouse/logs.go (516 lines)
+ 11 more implementation files
Reactions are currently unavailable