From 3c35ea539861a613bd0e29bcb6bca33e677ff802 Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Wed, 19 Mar 2025 16:00:38 +0100 Subject: [PATCH] Eviction: note on newest-first behavior --- events/retention.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/events/retention.py b/events/retention.py index f1e3407..ebcaecc 100644 --- a/events/retention.py +++ b/events/retention.py @@ -123,6 +123,10 @@ def get_age_for_irrelevance(age_based_irrelevance): def get_epoch_bounds_with_irrelevance(project, current_timestamp, qs_kwargs={"never_evict": False}): """Returns the epoch bounds for the project (newest first), with the age-based irrelevance for each epoch.""" + # newest-first is something we rely on in the below; e.g. in our 'single age-based UB-check'. Why this was chosen + # originally, I can't tell for sure, but it seems somewhat natural in the light of the newest epochs being the ones + # with the most variation in irrelevance (high-irrelevance events which have not yet been evicted are most likely to + # live in fresh epochs) from .models import Event