Alternative approach to partial tile cleanup for remote S3 buckets

オープン
#44 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
go
領域
backend, cloud

調査の方向性

この issue ではリポジトリのファイルもテストも指定されていないため、まず既存の部分的なタイルクリーンアップのエントリポイントを見つけ、リンクされた Azul の pull request と比較してください。コーディングの前に、このプロジェクトが chunk 単位で checkpoint ベースの動作を求めているかを明確にし、そのうえで安全にクリーンアップを進めるための完了条件とテストを定義してください。

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

説明

First off, thanks for writing partial-aftersun! I added partial tile cleanup in Azul and this was a huge help. However, I ended up taking a slightly different approach in the Azul implementation (https://github.com/cloudflare/azul/pull/59), so thought I'd post in case it's useful for other log operators.

Each time partial-aftersun runs it recurses though the entire directory looking for partial tiles to delete, and then deletes them if the safety checks pass. This runs as one big job and progress doesn't get saved, so you have to restart from the beginning each time.

I didn't see a way for this approach to work in the Azul/Workers implementation (mostly due to subrequest limits trying to iterate over an R2 bucket), so I adopted an iterative approach that could be run as many small jobs. Instead of recursing over files in the directory, the Azul partial tile cleaner iterates in chunks over leaf indexes from the last "cleaned" log size (initially zero) to the latest checkpoint tree size and generates the list of full tiles that must exist given the current tree size. Then, it just lists and deletes any partial tiles corresponding to those full tiles. This ended up being pretty fast and still hits all the safety checks in partial-aftersun.

主要言語
Go
スター
318
フォーク
32
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

FiloSottile/sunlight のほかの issue

FiloSottile/sunlight の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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