docs: record charade pre_chunks cleanup (9.28M→57K rows, 19G→130M)

This commit is contained in:
Accusys
2026-08-16 08:49:11 +08:00
parent 0533248f2c
commit 6c4c645337
@@ -140,11 +140,27 @@ No server was started (playground 3003 suspended; production 3002 untouched).
---
## 8. Data Cleanup (requires explicit user approval — pending)
## 8. Data Cleanup (DONE — user approved 2026-08-16)
Charade's existing ~9.28 M duplicate rows are NOT yet removed. Proposed (only after
user confirms): `DELETE` keeping one row per group + `VACUUM` to reclaim the 19 GB.
**Will ask before any deletion.**
Charade's duplicate pre_chunks were cleaned after explicit user approval:
- `pre_chunks`: **9,285,251 → 57,051 rows**; file size **19 GB → 130 MB**.
- Method: rebuilt table keeping one row per dedup key (`GROUP BY` on
file_uuid/processor/chunk/frame/time), then an extra asrx pass (same start_time,
differing `data` JSON), then `VACUUM`.
- Final per-processor counts (true uniques): face 43,103 · pose 8,191 · asrx 1,907 ·
cut 1,852 · asr 1,779 · ocr 219.
- `idx_pre_chunks_dedup` UNIQUE index now created successfully on the cleaned DB.
- `PRAGMA integrity_check` = ok.
- Full 19 GB backup preserved at `/tmp/charade_workspace_backup.sqlite` (delete after
the fix is verified in production).
### Commit
- `0533248f` — `fix: workspace pre_chunks dedup — stop 19GB re-dispatch bloat (A1) + charade analysis`
- Staged files: `src/core/db/workspace_sqlite.rs` (A1) + this report. `job_worker.rs`
(A3 write-guard) was implemented and verified but **intentionally left uncommitted**
because the working tree also contains unrelated prior-session changes (cut key-frame
removal, paired with `proxy.rs`); kept out to avoid polluting the commit scope. A1
alone (INSERT OR IGNORE + index) already prevents the space blow-up.
---