aboutsummaryrefslogtreecommitdiff
path: root/src/table/gc.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-15 16:21:41 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-15 16:21:41 +0100
commit3bf2df622a070fe8f233bec6d60bd5cca995fbfc (patch)
tree65ba71d4b950208c177a96ba34b797f18e732d5b /src/table/gc.rs
parent097c339d981dba0420af17d30d1221181d8bf1d7 (diff)
downloadgarage-3bf2df622a070fe8f233bec6d60bd5cca995fbfc.tar.gz
garage-3bf2df622a070fe8f233bec6d60bd5cca995fbfc.zip
Time and metadata improvements
Diffstat (limited to 'src/table/gc.rs')
-rw-r--r--src/table/gc.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/table/gc.rs b/src/table/gc.rs
index 5b7f1ee7..c13c8234 100644
--- a/src/table/gc.rs
+++ b/src/table/gc.rs
@@ -75,17 +75,19 @@ where
match self.gc_loop_iter().await {
Ok(true) => {
// Stuff was done, loop imediately
+ continue;
}
Ok(false) => {
- select! {
- _ = tokio::time::delay_for(Duration::from_secs(10)).fuse() => (),
- _ = must_exit.recv().fuse() => (),
- }
+ // Nothing was done, sleep for some time (below)
}
Err(e) => {
warn!("({}) Error doing GC: {}", self.data.name, e);
}
}
+ select! {
+ _ = tokio::time::delay_for(Duration::from_secs(10)).fuse() => (),
+ _ = must_exit.recv().fuse() => (),
+ }
}
Ok(())
}