huskies: merge 1094 bug delete_story leaks zombie rows in pipeline_items shadow table — 176 tombstoned items still report non-terminal stages

This commit is contained in:
dave
2026-05-15 12:21:17 +00:00
parent d944885ce9
commit 2857c3b46b
7 changed files with 201 additions and 8 deletions
+4 -1
View File
@@ -142,7 +142,10 @@ pub async fn delete_work_item(
}
// 5. Delete from database content store and shadow table.
crate::db::delete_item(story_id);
// Use the synchronous variant so the pipeline_items row is gone before we
// return — the fire-and-forget channel cannot guarantee the DELETE commits
// before a restart, which leaves zombie rows (bug 1094).
crate::db::delete_item_sync(story_id).await;
slog_warn!("[delete_work_item] Deleted '{story_id}' from content store / shadow table");
// 6. Remove the filesystem shadow file from work/N_stage/.