Do full sync on node (re)start

This commit is contained in:
Alex Auvolat 2020-04-21 16:15:32 +00:00
parent 2a84d965ab
commit a04218047e

View File

@ -18,7 +18,7 @@ use crate::membership::Ring;
use crate::table::*; use crate::table::*;
const MAX_DEPTH: usize = 16; const MAX_DEPTH: usize = 16;
const SCAN_INTERVAL: Duration = Duration::from_secs(1800); const SCAN_INTERVAL: Duration = Duration::from_secs(3600);
const CHECKSUM_CACHE_TIMEOUT: Duration = Duration::from_secs(1800); const CHECKSUM_CACHE_TIMEOUT: Duration = Duration::from_secs(1800);
const TABLE_SYNC_RPC_TIMEOUT: Duration = Duration::from_secs(30); const TABLE_SYNC_RPC_TIMEOUT: Duration = Duration::from_secs(30);
@ -131,6 +131,13 @@ where
) )
.await; .await;
let s3 = syncer.clone();
table.system.background.spawn(async move {
tokio::time::delay_for(Duration::from_secs(20)).await;
s3.add_full_scan().await;
Ok(())
});
syncer syncer
} }