From 2e0c103864b8a90ae48712401914af6305891391 Mon Sep 17 00:00:00 2001 From: Sicheng Pan Date: Tue, 14 Jan 2025 16:25:04 -0800 Subject: [PATCH] Trace one off collection ids --- rust/worker/src/compactor/compaction_manager.rs | 5 ++++- rust/worker/src/compactor/scheduler.rs | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/rust/worker/src/compactor/compaction_manager.rs b/rust/worker/src/compactor/compaction_manager.rs index 09e84a86397..cf11d1d484a 100644 --- a/rust/worker/src/compactor/compaction_manager.rs +++ b/rust/worker/src/compactor/compaction_manager.rs @@ -334,9 +334,12 @@ impl Handler for CompactionManager { message: OneOffCompactionMessage, _ctx: &ComponentContext, ) { - tracing::info!("CompactionManager: Performing one-off compaction"); self.scheduler .add_oneoff_collections(message.collection_ids); + tracing::info!( + "One-off collections queued: {:?}", + self.scheduler.get_oneoff_collections() + ); } } diff --git a/rust/worker/src/compactor/scheduler.rs b/rust/worker/src/compactor/scheduler.rs index 0e6f73fe2f1..83a4b5db4e1 100644 --- a/rust/worker/src/compactor/scheduler.rs +++ b/rust/worker/src/compactor/scheduler.rs @@ -66,6 +66,10 @@ impl Scheduler { self.oneoff_collections.extend(ids); } + pub(crate) fn get_oneoff_collections(&self) -> Vec { + self.oneoff_collections.iter().cloned().collect() + } + async fn get_collections_with_new_data(&mut self) -> Vec { let collections = self .log