From 1dd63631c050d99d420137e86d103cfb5c9185f3 Mon Sep 17 00:00:00 2001 From: steviez Date: Fri, 8 Apr 2022 00:49:21 -0500 Subject: [PATCH] Add high level overview comments on ledger_cleanup_service (#24184) --- core/src/ledger_cleanup_service.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/ledger_cleanup_service.rs b/core/src/ledger_cleanup_service.rs index 77705ad054..7e4c896ac7 100644 --- a/core/src/ledger_cleanup_service.rs +++ b/core/src/ledger_cleanup_service.rs @@ -1,4 +1,8 @@ -//! The `ledger_cleanup_service` drops older ledger data to limit disk space usage +//! The `ledger_cleanup_service` drops older ledger data to limit disk space usage. +//! The service works by counting the number of live data shreds in the ledger; this +//! can be done quickly and should have a fairly stable correlation to actual bytes. +//! Once the shred count (and thus roughly the byte count) reaches a threshold, +//! the services begins removing data in FIFO order. use { crossbeam_channel::{Receiver, RecvTimeoutError},