From d2e56634d7d3300f4147996bc6237c54885d639d Mon Sep 17 00:00:00 2001 From: Vladislav Shchetinin Date: Mon, 10 Aug 2026 13:21:29 +0300 Subject: [PATCH] Fix: Change the default value of protection_window from 24h to implicit behavior 0s --- README.md | 2 +- config/vacuum.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f75f9fb..c9fae23 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ behaviour of garbage collection performed during | `trash_retention_days` | int | `7` | Number of days a file stays in `/trash` before being permanently removed. | | `trash_move_workers` | int | `1` | Number of parallel workers used to move files to `/trash`. | | `trash_delete_workers` | int | `1` | Number of parallel workers used to delete files from `/trash`. | -| `protection_window` | duration | `24h` | Minimum age a file must have, based on its storage `LastMod` timestamp, before it is eligible for garbage deletion. Accepts a duration string, e.g. `"1h"`, `"30m"`, `"24h"`. Set to `"0s"` to disable this extra protection window. | +| `protection_window` | duration | `0s` | Minimum age a file must have, based on its storage `LastMod` timestamp, before it is eligible for garbage deletion. Accepts a duration string, e.g. `"1h"`, `"30m"`, `"24h"`. Set to `"0s"` to disable this extra protection window. | Regardless of the `protection_window` value, yproxy **always** unconditionally skips any file whose `LastMod` timestamp is at or diff --git a/config/vacuum.go b/config/vacuum.go index a77b0bd..e3f9c30 100644 --- a/config/vacuum.go +++ b/config/vacuum.go @@ -8,7 +8,7 @@ const ( DefaultTrashRetentionDays = 7 DefaultTrashMoveWorkers = 1 DefaultTrashDeleteWorkers = 1 - DefaultProtectionWindow = 24 * time.Hour + DefaultProtectionWindow = 0 * time.Second ) type Vacuum struct {