Skip to content

Retention backs off after a failed protection census and shows it in health - #1101

Merged
ualtinok merged 3 commits into
mainfrom
land/retention-census-backoff
Oct 28, 2026
Merged

ualtinok merged 3 commits into
mainfrom
land/retention-census-backoff

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Follow-up to #1094. A full fleet-scale fixture (30,000 shell tasks, 1,372 sessions, 350,000 files, 50 trash entries) shows one retention pass with the streaming census finishing well inside the 60 s budget: 0.6-0.9 s on Linux, 6.8 s wall / 3.7 s CPU on macOS, reclaiming all 50 entries. (The live daemon's endless "repair traversal limit exceeded" retention predates #1060 and #1094.) Finished task bundles still need alias protection, so the census stays complete rather than narrowed to running tasks.

What changes: when a protection census can't finish, retention backs off 20, then 40, then at most 60 minutes instead of re-running the full census every pass; health shows the typed failure and protection_retry_at_ms; a successful census clears the backoff at once. Tests: the scale fixture (full size behind AFT_STRESS=1; the default size exercises a census cut-off that deletes nothing) and backoff clearing after a successful retry.


Summary by cubic

La retención espera 20, luego 40 y como máximo 60 minutos después de un censo de protección fallido, en lugar de repetir el censo completo en cada pasada. La salud muestra el fallo tipado y protection_retry_at_ms, y un censo exitoso limpia el respaldo de inmediato.

Un fixture a escala de flota (30 000 tareas, 350 000 archivos) completa el censo en 0,6–0,9 s en Linux y ~7 s en macOS, manteniendo la protección completa de alias, incluidos los paquetes de tareas terminadas; solo los casos de estrés reducido ejercitan el corte que elimina cero entradas.

Written for commit 1ae5b0b. Summary will update on new commits.

View guided diff Turn on auto-fix

ualtinok and others added 3 commits October 28, 2026 18:41
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Preserve full durable-directory alias protection, including finished bundles: the 30k task Linux fixture completes #1094's census within the 60s budget. Add 20/40/60 minute failure backoff, expose retry time alongside the typed failure in health, and clear backoff on a successful pass.

Strengthen the existing live-alias test to cover a real task layout's nested io directory, and add a completed-task counterpart; the protection contract is unchanged. Exercise a default-size cutoff with zero deletion and a fresh successful retry; measure full fleet scale under AFT_STRESS=1, including macOS thread CPU time.

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok
ualtinok added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit cf354b1 Oct 28, 2026
91 of 92 checks passed
@ualtinok
ualtinok deleted the land/retention-census-backoff branch October 28, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant