Garbage collection for unreferenced attachments
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- javascript, markdown
- 領域
- backend
調査の方向性
まず issues #1623 と #1633 のコンテキスト、および既存の DELETE attachment endpoint を読みます。この issue ではクリーンアップのトリガー候補がいくつか示されていますが、1 つは選ばれていません。まず、sync のパフォーマンスを損なわずに note Markdown を解析するための妥当なアプローチを決定し、note フォルダーの外側にある相対パスの扱いを定義してください。合意されたクリーンアップ戦略が実装され、そのエッジケースに対処できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Follow up to #1623 and #1633.
Since #1633, API attachments live in a note's own .attachments. folder. The whole folder is removed when the note is deleted, and a single file can be removed through the new DELETE attachment endpoint. What is still missing is cleanup of attachments that are no longer referenced in a note's text.
When a user edits a note and removes an image or a link, the underlying file stays in .attachments. indefinitely, so orphaned files build up that nobody can reach from the note.
This was left out because finding unused attachments means parsing each note's Markdown to collect the referenced paths, which is the server side parsing we have tried to avoid for sync performance. So it needs a deliberate approach.
Options to consider:
- On note save, parse the referenced paths and delete any file in that note's .attachments. folder that is no longer referenced.
- A separate background or on demand job that does the same sweep across all notes.
Leave deletion to clients through the DELETE endpoint and keep nothing automatic.
Open questions: which trigger is acceptable given the sync performance concern, and how to treat attachments referenced by relative paths that point outside the note's own folder.
- 主要言語
- JavaScript
- スター
- 738
- フォーク
- 162
- 平均マージ
- 2時間 42分
- マージ済み PR(30日)
- 39
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextcloud/notes のほかの issue
-
bug need to reproduce
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
bug need to reproduce
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
feature request needs discussion
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
nextcloud/notes の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100
-
Issue-Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
sugarlabs/musicblocks#8924 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled オープンcustomer-eng status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100