[Bug]: Long-running watch-together rooms can lose their database row

オープン 初心者向け
#116 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
backend

調査の方向性

src/together.rs の652行目付近にある、last_active に基づいて watch_rooms の行を削除するクリーンアップを開き、issue によると last_active を書き込む唯一の箇所である save(エピソードや設定の変更時、およびルームが空になったとき)と合わせて読んでください。次に、インメモリのルームレジストリが、ルームが現在使用中かどうかをどのように公開しているかを調べてください。修正では、クリーンアップ時に該当するコードをスキップするか、毎時の tick でそれらの last_active を更新します。7日を超えて使用中のルームが、再起動後も行を保持していれば完了です。テストのパスは指定されていないため、変更する前に、現在クリーンアップがどのように実行されているかを確認してください。

索引モデルが issue の本文から書いたものです。

説明

bug

[!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分
マージ済み PR(30日)
5

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

tinystream-dev/tinystream のほかの issue

tinystream-dev/tinystream の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。