[Bug]: Long-running watch-together rooms can lose their database row
還沒有人認領這個 Issue。
評估
研究方向
開啟 src/together.rs,查看約第 652 行附近依據 last_active 刪除 watch_rooms 資料列的清理邏輯,並搭配 save 閱讀;issue 指出它是唯一寫入 last_active 的地方(在劇集/設定變更,以及房間變空時)。接著找出記憶體中的房間 registry 如何暴露房間目前是否有人,因為修正方式是清理時略過這些代碼,或在每小時的 tick 為它們更新 last_active。完成標準是:持續有人使用超過 7 天的房間,在重新啟動後仍保留其資料列。沒有指定測試路徑,因此修改前先檢查目前如何執行清理。
由索引模型根據 Issue 內容生成。
描述
[!NOTE]
This issue was written by Claude (Claude Opus 5.5) from a code review session with @PhrolovaMoe. It was found by reading the code and hasn't been reproduced on a running server.
Version
0.40.0 (feat/desktop, 017a837b)
Area
Streaming / playback
What happened?
The hourly cleanup deletes watch_rooms rows whose last_active is older than 7 days (src/together.rs:652), but last_active is only written by save, which runs on episode or settings changes and when the room empties. A room that stays occupied for over 7 days without those has its row deleted while it's live; later saves update nothing and the room is gone after a restart.
Expected behavior
Rooms in use are never cleaned up.
Suggested fix
Skip codes of non-empty in-memory rooms in the cleanup, or touch last_active for occupied rooms on the hourly tick.
- 主要語言
- TypeScript
- 星號
- 4
- 分支
- 1
- 平均合併
- 4 小時 49 分鐘
- 30 天內合併 PR
- 5
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
tinystream-dev/tinystream 的其他 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 82/100
tinystream-dev/tinystream#132 ·
-
bug
難度 2/5 1-3 小時 新手友好度 82/100
tinystream-dev/tinystream#131 ·
-
bug
難度 1/5 1 小時以內 新手友好度 88/100
tinystream-dev/tinystream#129 ·
-
bug
難度 2/5 1-3 小時 新手友好度 76/100
tinystream-dev/tinystream#128 ·
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
tinystream-dev/tinystream#124 ·
查看 tinystream-dev/tinystream 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 86/100
sandbox-quantum/switch#2163 ·
維護者通常 1 天內回覆
-
automated issue report
難度 1/5 1 小時以內 新手友好度 78/100
維護者通常 1 天內回覆
-
area/dashboard kind/bug QA/dev-automation
難度 1/5 1 小時以內 新手友好度 75/100
維護者通常 1 天內回覆
-
bug pydanty:is-working
難度 2/5 1-3 小時 新手友好度 82/100
pydantic/pydantic-ai#13939 ·
維護者通常 1 天內回覆
-
self-host
難度 2/5 1-3 小時 新手友好度 70/100
funmusicplace/mirlo#2625 ·
維護者通常 1 天內回覆