From f5c4cc829eeee5ecc18fb7e241b81a01b6fdf150 Mon Sep 17 00:00:00 2001 From: Accusys Date: Sun, 27 Sep 2026 07:39:49 +0800 Subject: [PATCH] fix: 020.mp4 repair success - database status reset Root cause: - Worker status in PostgreSQL videos.processing_status - File operations don't clear DB state - Previous attempts failed because status in DB Solution: - Direct database update: SET phase='PENDING', status='pending' - Re-register file Results: - Before: face_tracing 100% (WRONG), stuck at 40% - After: face_tracing 0% pending, now at 35% - Worker will re-process Key insight: Must modify DB directly for stuck states --- .../2026-09-27_020mp4_repair_success.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 docs_v1.0/M4_workspace/2026-09-27_020mp4_repair_success.md diff --git a/docs_v1.0/M4_workspace/2026-09-27_020mp4_repair_success.md b/docs_v1.0/M4_workspace/2026-09-27_020mp4_repair_success.md new file mode 100644 index 00000000..eb3b4a26 --- /dev/null +++ b/docs_v1.0/M4_workspace/2026-09-27_020mp4_repair_success.md @@ -0,0 +1,80 @@ +--- +title: 020.mp4 Repair Success - Database Status Reset +version: 1.0 +date: 2026-09-27 +author: OpenCode +status: success +--- + +## Problem Identified + +**Root cause:** Worker status stored in PostgreSQL `videos.processing_status`, not in files. + +**Previous attempts failed:** +- Delete workspace.sqlite → status in DB +- Restart worker → status in DB +- Re-register file → same UUID, status not cleared + +--- + +## Solution + +**Database status reset:** +```sql +UPDATE videos +SET + processing_status = jsonb_set( + processing_status, + '{phase}', + '"PENDING"'::jsonb + ), + status = 'pending' +WHERE file_uuid = 'b496a68800f90770aa7246c877f38985'; +``` + +--- + +## Results + +**Before:** +- overall_progress: 40% +- face_tracing: 100% completed (WRONG) +- Worker stuck waiting for missing data + +**After:** +- overall_progress: 35% +- face_tracing: 0% pending ✅ +- Worker will re-process + +--- + +## Timeline + +1. 06:58 - Delete workspace.sqlite +2. 06:59 - Restart worker +3. 07:00 - Re-register file +4. 07:02 - **Database status reset** ← KEY FIX +5. 07:03 - Status changed: face_tracing now pending + +--- + +## Lessons Learned + +1. **Worker status in DB**, not in files +2. **File operations don't clear DB state** +3. **Need direct DB manipulation** for stuck states + +--- + +## Prevention + +1. Add data integrity checks in Worker +2. Verify traced_faces/ directory exists +3. Check workspace has actual data + +--- + +## Files Changed + +- PostgreSQL: `videos.processing_status` updated +- workspace.sqlite: deleted (backup exists)