From ae02a3033acca3f59301c1b55168fc137e99842e Mon Sep 17 00:00:00 2001 From: Joris Bayer Date: Thu, 5 Sep 2024 14:51:01 +0200 Subject: [PATCH] doc: Simplify comment --- relay-server/src/services/buffer/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/relay-server/src/services/buffer/mod.rs b/relay-server/src/services/buffer/mod.rs index 601b91ae01..f07470f9e0 100644 --- a/relay-server/src/services/buffer/mod.rs +++ b/relay-server/src/services/buffer/mod.rs @@ -147,9 +147,8 @@ impl EnvelopeBufferService { /// has been reached. /// - We need a valid global config to unspool. pub fn should_pop(&self, buffer: &PolymorphicEnvelopeBuffer) -> bool { - // 1 - check memory. In case of the in-memory implementation, dequeuing is beneficial because - // it could reduce memory pressure, but for the on-disk implementation, we should not dequeue - // from disk unless there's RAM available. + // We should not unspool from external storage if memory capacity has been reached. + // But if buffer storage is in memory, unspooling can reduce memory usage. if buffer.is_external() && self.memory_checker.check_memory().is_exceeded() { return false; }