Skip to content

Commit

Permalink
doc: Simplify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jjbayer committed Sep 5, 2024
1 parent 31dfbf3 commit ae02a30
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions relay-server/src/services/buffer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ae02a30

Please sign in to comment.