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
This commit is contained in:
Accusys
2026-09-27 07:39:49 +08:00
parent 7e202a1bd9
commit f5c4cc829e
@@ -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)