From 0428b6822a0b4646734fb52e9b047de668704774 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Tue, 28 Mar 2023 11:53:48 +0200 Subject: [PATCH] doc: more comment on lru_candidates to address questions from review --- pageserver/src/disk_usage_eviction_task.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pageserver/src/disk_usage_eviction_task.rs b/pageserver/src/disk_usage_eviction_task.rs index 9dc1340d2e..eef64ae51c 100644 --- a/pageserver/src/disk_usage_eviction_task.rs +++ b/pageserver/src/disk_usage_eviction_task.rs @@ -488,6 +488,12 @@ enum Mode { /// Figure out eviction candidates for the given tenant and append them to `lru_candidates`. /// +/// The `mode` argument controls which layers get appended to `lru_candidates`. +/// Read its type's doc comments for more details. +/// +/// The caller is responsible for sorting `lru_candidates` once it has called this function +/// for all tenants. +/// /// 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`.