diff options
| author | tv <tv@krebsco.de> | 2026-10-20 00:51:39 +0200 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-20 00:51:39 +0200 |
| commit | a40d8da20f7b40bcdf2f7e335f51aa6b39465318 (patch) | |
| tree | 14e040a3764000746eec0ceea8d8a2faebd6e52e /src/main.rs | |
| parent | 502f95f170a6205b6b3fa41324a9c80ba34fb5b9 (diff) | |
add epoch switch
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 f988a77..16558f0 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, |
