fix: reduce ClickHouse log noise, admin query spam, and diagram scan perf
All checks were successful
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m7s
CI / docker (push) Successful in 1m25s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Successful in 40s

- Set com.clickhouse log level to INFO and org.apache.hc.client5 to WARN
- Admin hooks (useUsers/useGroups/useRoles) now only fetch on admin pages,
  eliminating AUDIT view_users entries on every UI click
- Add ClickHouse projection on route_diagrams for (tenant_id, route_id,
  instance_id, created_at) to avoid full table scans on diagram lookups
- Bump @cameleer/design-system to v0.1.28 (PAUSED mode time range fix,
  refreshTimeRange API)
- Call refreshTimeRange before invalidateQueries in PAUSED mode manual
  refresh so sidebar clicks use current time window

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-03 14:48:30 +02:00
parent 2708bcec17
commit 6f00ff2e28
6 changed files with 36 additions and 16 deletions

View File

@@ -66,6 +66,11 @@ clickhouse:
username: ${CLICKHOUSE_USERNAME:default}
password: ${CLICKHOUSE_PASSWORD:}
logging:
level:
com.clickhouse: INFO
org.apache.hc.client5: WARN
management:
endpoints:
web:

View File

@@ -0,0 +1,8 @@
-- Projection for fast route_id + instance_id lookups on route_diagrams.
-- The primary key is (tenant_id, content_hash) which serves hash-based lookups.
-- Queries filtering by route_id + instance_id were scanning millions of rows.
ALTER TABLE route_diagrams
ADD PROJECTION IF NOT EXISTS prj_route_instance
(SELECT content_hash, created_at ORDER BY tenant_id, route_id, instance_id, created_at);
ALTER TABLE route_diagrams MATERIALIZE PROJECTION IF NOT EXISTS prj_route_instance