Go to file
aaverbitskiy 1f5b393675 bookings/map: read pf_board and board_info with FINAL to dedup ReplacingMergeTree
Both tables are ReplacingMergeTree; dedup happens only during background part
merges, not at read time. The ongoing etl_rw feed keeps inserting into pf_board,
so right after an insert that updates an existing row there is a short window
(before the forced merge, min_age_to_force_merge_seconds=15) where the same
task_id / board_key exists in two parts. A plain SELECT reads both parts and
returns the row twice.

The /api/boards query already collapses duplicates via argMax + GROUP BY, but
/api/bookings and the two /api/map queries read raw rows, so they could
intermittently double a booking (timeline/balloon) or a surface marker.

Add FINAL to those three reads (pf_board in bookings + map current, board_info
in map surfaces). At 463/515 rows the cost is negligible and it removes the
class of transient duplicates regardless of merge timing. Output verified
unchanged against the single-part baseline.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-05 19:25:40 +00:00
frontend filters: add faceted Status (task_status) filter — meta.statuses, boards/bookings/map filtering (map marker visibility), UI dropdown under Size in filter grid 2026-07-27 19:40:26 +00:00
.gitignore db creds: move ClickHouse user/password to gitignored .env via compose env_file; drop hardcoded default from main.py 2026-07-23 05:19:13 +00:00
docker-compose.yml db creds: move ClickHouse user/password to gitignored .env via compose env_file; drop hardcoded default from main.py 2026-07-23 05:19:13 +00:00
Dockerfile Import mapdash (FastAPI + vis-timeline) + docker-compose with static volume 2026-07-17 15:13:27 +00:00
main.py bookings/map: read pf_board and board_info with FINAL to dedup ReplacingMergeTree 2026-08-05 19:25:40 +00:00
requirements.txt Import mapdash (FastAPI + vis-timeline) + docker-compose with static volume 2026-07-17 15:13:27 +00:00