Update dependencies

This commit is contained in:
Alex Auvolat
2021-03-16 15:58:40 +01:00
parent 2a41b82384
commit f4346cc5f4
18 changed files with 142 additions and 273 deletions
+3 -5
View File
@@ -16,19 +16,17 @@ path = "lib.rs"
garage_util = { version = "0.1.1", path = "../util" }
garage_rpc = { version = "0.1.1", path = "../rpc" }
bytes = "0.4"
rand = "0.7"
hex = "0.3"
bytes = "1.0"
rand = "0.8"
log = "0.4"
hexdump = "0.1"
sled = "0.34"
rmp-serde = "0.14.3"
rmp-serde = "0.15"
serde = { version = "1.0", default-features = false, features = ["derive", "rc"] }
serde_bytes = "0.11"
async-trait = "0.1.30"
futures = "0.3"
futures-util = "0.3"
tokio = { version = "1.0", default-features = false, features = ["rt", "rt-multi-thread", "io-util", "net", "time", "macros", "sync", "signal", "fs"] }
+5 -6
View File
@@ -20,7 +20,6 @@ use crate::data::*;
use crate::replication::*;
use crate::schema::*;
// This modules partitions the data in 2**16 partitions, based on the top
// 16 bits (two bytes) of item's partition keys' hashes.
// It builds one Merkle tree for each of these 2**16 partitions.
@@ -73,10 +72,7 @@ where
F: TableSchema + 'static,
R: TableReplication + 'static,
{
pub(crate) fn launch(
background: &BackgroundRunner,
data: Arc<TableData<F, R>>,
) -> Arc<Self> {
pub(crate) fn launch(background: &BackgroundRunner, data: Arc<TableData<F, R>>) -> Arc<Self> {
let empty_node_hash = blake2sum(&rmp_to_vec_all_named(&MerkleNode::Empty).unwrap()[..]);
let ret = Arc::new(Self {
@@ -132,7 +128,10 @@ where
};
let key = MerkleNodeKey {
partition: self.data.replication.partition_of(&Hash::try_from(&k[0..32]).unwrap()),
partition: self
.data
.replication
.partition_of(&Hash::try_from(&k[0..32]).unwrap()),
prefix: vec![],
};
self.data
+5 -11
View File
@@ -244,12 +244,8 @@ where
)));
}
} else {
self.offload_partition(
&partition.begin,
&partition.end,
must_exit,
)
.await?;
self.offload_partition(&partition.begin, &partition.end, must_exit)
.await?;
}
Ok(())
@@ -399,9 +395,7 @@ where
);
return Ok(());
}
SyncRPC::RootCkDifferent(true) => {
VecDeque::from(vec![root_ck_key])
}
SyncRPC::RootCkDifferent(true) => VecDeque::from(vec![root_ck_key]),
x => {
return Err(Error::Message(format!(
"Invalid respone to RootCkHash RPC: {}",
@@ -550,7 +544,7 @@ impl SyncTodo {
let begin = partitions[i].1;
let end = if i + 1 < partitions.len() {
partitions[i+1].1
partitions[i + 1].1
} else {
[0xFFu8; 32].into()
};
@@ -579,7 +573,7 @@ impl SyncTodo {
return None;
}
let i = rand::thread_rng().gen_range::<usize, _, _>(0, self.todo.len());
let i = rand::thread_rng().gen_range(0..self.todo.len());
if i == self.todo.len() - 1 {
self.todo.pop()
} else {