aboutsummaryrefslogtreecommitdiff
path: root/src/block.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-19 17:59:59 +0000
committerAlex Auvolat <alex@adnab.me>2020-04-19 17:59:59 +0000
commitea75564851851b969ef23797537c813ba607b84a (patch)
treed5bdb1a19a546cbbd92e35dbd496acfd16522dd9 /src/block.rs
parente325c7f47a9ad7777358b669f62a7c613f676ecd (diff)
downloadgarage-ea75564851851b969ef23797537c813ba607b84a.tar.gz
garage-ea75564851851b969ef23797537c813ba607b84a.zip
More aggressive sync timings & improve other stuff
Diffstat (limited to 'src/block.rs')
-rw-r--r--src/block.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/block.rs b/src/block.rs
index c84f193b..489dc33e 100644
--- a/src/block.rs
+++ b/src/block.rs
@@ -193,7 +193,7 @@ impl BlockManager {
let old_rc = self.rc.get(&hash)?;
self.rc.merge(&hash, vec![1])?;
if old_rc.map(|x| u64_from_bytes(&x[..]) == 0).unwrap_or(true) {
- self.put_to_resync(&hash, 2 * BLOCK_RW_TIMEOUT.as_millis() as u64)?;
+ self.put_to_resync(&hash, BLOCK_RW_TIMEOUT.as_millis() as u64)?;
}
Ok(())
}
@@ -201,7 +201,7 @@ impl BlockManager {
pub fn block_decref(&self, hash: &Hash) -> Result<(), Error> {
let new_rc = self.rc.merge(&hash, vec![0])?;
if new_rc.map(|x| u64_from_bytes(&x[..]) == 0).unwrap_or(true) {
- self.put_to_resync(&hash, BLOCK_RW_TIMEOUT.as_millis() as u64)?;
+ self.put_to_resync(&hash, 0)?;
}
Ok(())
}