diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 8e128f0..1127cd8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -157,6 +157,7 @@ async fn main() -> Result<()> { initial_sync_done: Arc::new(AtomicBool::new(false)), change_events, timing: Timing::from_keepalive(Duration::from_secs(args.keepalive_secs)), + compaction: Arc::new(compaction::Compaction::default()), }; info!("Application state initialized"); @@ -195,6 +196,9 @@ async fn main() -> Result<()> { let publisher_state = state.clone(); tokio::spawn(async move { sync::run_change_publisher(publisher_state).await }); + // Switches to committed epochs. Runs only once the node is Ready. + tokio::spawn(compaction::run_worker(state.clone())); + info!( cluster_id = ?state.cluster_id().await, ready = state.is_ready().await, |
