mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-06 12:57:41 +00:00
Time and metadata improvements
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use garage_util::data::now_msec;
|
||||
use garage_util::time::now_msec;
|
||||
|
||||
use crate::crdt::crdt::*;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use garage_util::data::now_msec;
|
||||
use garage_util::time::now_msec;
|
||||
|
||||
use crate::crdt::crdt::*;
|
||||
|
||||
|
||||
+6
-4
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user