From 42d63270a57b89a520a1f78bac961764a1623ba4 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Tue, 28 Mar 2023 11:42:47 +0200 Subject: [PATCH] doc: add comment on extend_lru_candidates --- pageserver/src/disk_usage_eviction_task.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pageserver/src/disk_usage_eviction_task.rs b/pageserver/src/disk_usage_eviction_task.rs index 607898c6f5..9dc1340d2e 100644 --- a/pageserver/src/disk_usage_eviction_task.rs +++ b/pageserver/src/disk_usage_eviction_task.rs @@ -486,6 +486,11 @@ enum Mode { GlobalLru, } +/// Figure out eviction candidates for the given tenant and append them to `lru_candidates`. +/// +/// The `scratch` vector is temporary storage and taken as an argument to avoid allocations. +/// It must be empty when calling this function. It is guaranteed to be empty when we +/// return `ControlFlow::Continue`. #[instrument(skip_all, fields(?mode, %tenant_id))] async fn extend_lru_candidates( mode: Mode,