[Bug]: FLAC copies in the music cache are never cleaned up

Đang mở
#119 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
backend

Hướng nghiên cứu

Start at src/api/music.rs:1266, where flac_copy writes the cache keyed by path, size and mtime, and trace what else reads or deletes files under cache/music/. Then find the scan/indexing path to see where track keys are invalidated on change or deletion, since that is where stale copies would be pruned. Done means the cache is bounded by an eviction rule and orphaned copies are removed during scans, with a test covering both.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Other

What happened?

flac_copy writes a FLAC copy of a track to cache/music/ the first time it's asked for (src/api/music.rs:1266), keyed by path, size and mtime. Nothing removes them, including copies of tracks that changed or were deleted, so the cache grows with every lossy-to-lossless request.

Expected behavior

The cache has a size limit or an expiry.

Suggested fix

Evict least recently used copies over a size limit (or older than N days), and remove copies whose key no longer matches a track during scans.

Ngôn ngữ chính
TypeScript
Star
4
Fork
1
Merge trung bình
4 giờ 49 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tinystream-dev/tinystream

Tất cả issue của tinystream-dev/tinystream

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.