Skip to content

Commit 87cb4f6

Browse files
committed
chore: more debug logs for gc
1 parent 63cbfba commit 87cb4f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/store/fs/gc.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ pub type ProtectCb = Arc<
154154
>;
155155

156156
pub async fn gc_run_once(store: &Store, live: &mut HashSet<Hash>) -> crate::api::Result<()> {
157+
debug!(externally_protected = live.len(), "gc: start");
157158
{
158159
store.clear_protected().await?;
159160
let mut stream = gc_mark(store, live);
@@ -172,6 +173,7 @@ pub async fn gc_run_once(store: &Store, live: &mut HashSet<Hash>) -> crate::api:
172173
}
173174
}
174175
}
176+
debug!(total_protected = live.len(), "gc: sweep");
175177
{
176178
let mut stream = gc_sweep(store, live);
177179
while let Some(ev) = stream.next().await {
@@ -189,11 +191,13 @@ pub async fn gc_run_once(store: &Store, live: &mut HashSet<Hash>) -> crate::api:
189191
}
190192
}
191193
}
194+
debug!("gc: done");
192195

193196
Ok(())
194197
}
195198

196199
pub async fn run_gc(store: Store, config: GcConfig) {
200+
debug!("gc enabled with interval {:?}", config.interval);
197201
let mut live = HashSet::new();
198202
loop {
199203
live.clear();

0 commit comments

Comments
 (0)