forked from Deuxfleurs/garage
Do full sync on node (re)start
This commit is contained in:
parent
2a84d965ab
commit
a04218047e
1 changed files with 8 additions and 1 deletions
|
@ -18,7 +18,7 @@ use crate::membership::Ring;
|
|||
use crate::table::*;
|
||||
|
||||
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 TABLE_SYNC_RPC_TIMEOUT: Duration = Duration::from_secs(30);
|
||||
|
||||
|
@ -131,6 +131,13 @@ where
|
|||
)
|
||||
.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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue