Alternative approach to partial tile cleanup for remote S3 buckets

Abierto
#44 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
go
Área
backend, cloud

Línea de trabajo

El issue no menciona ningún archivo del repositorio ni ninguna prueba; empieza localizando el punto de entrada existente para la limpieza parcial de tiles y compáralo con el pull request de Azul enlazado. Antes de programar, aclara si este proyecto requiere el comportamiento por fragmentos y basado en checkpoints, y después define los criterios de finalización y las pruebas para un progreso seguro de la limpieza.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Go
Estrellas
318
Forks
32
Merge medio
5 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de FiloSottile/sunlight

Todos los issues de FiloSottile/sunlight

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.