Review comments
This commit is contained in:
committed by
Greg Fitzgerald
parent
6843b71a0d
commit
5455e8e6a9
@ -241,18 +241,13 @@ impl Crdt {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// enumerate all the blobs, those are the indices
|
// enumerate all the blobs, those are the indices
|
||||||
let orders: Vec<_> = blobs.iter().enumerate().collect();
|
for (i, b) in blobs.iter().enumerate() {
|
||||||
info!("orders table {}", orders.len());
|
|
||||||
let _: Vec<_> = orders
|
|
||||||
.into_iter()
|
|
||||||
.map(|(i, b)| {
|
|
||||||
// only leader should be broadcasting
|
// only leader should be broadcasting
|
||||||
let mut blob = b.write().expect("'blob' write lock in crdt::index_blobs");
|
let mut blob = b.write().expect("'blob' write lock in crdt::index_blobs");
|
||||||
blob.set_id(me.id).expect("set_id in pub fn broadcast");
|
blob.set_id(me.id).expect("set_id in pub fn broadcast");
|
||||||
blob.set_index(*transmit_index + i as u64)
|
blob.set_index(*transmit_index + i as u64)
|
||||||
.expect("set_index in pub fn broadcast");
|
.expect("set_index in pub fn broadcast");
|
||||||
})
|
}
|
||||||
.collect();
|
|
||||||
info!("set blobs index");
|
info!("set blobs index");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -414,9 +414,9 @@ fn broadcast(
|
|||||||
// Fill in the coding blob data from the window data blobs
|
// Fill in the coding blob data from the window data blobs
|
||||||
#[cfg(feature = "erasure")]
|
#[cfg(feature = "erasure")]
|
||||||
{
|
{
|
||||||
match erasure::generate_coding(&mut window.write().unwrap(), *transmit_index as usize) {
|
if erasure::generate_coding(&mut window.write().unwrap(), *transmit_index as usize).is_err()
|
||||||
Err(_e) => return Err(Error::GenericError),
|
{
|
||||||
_ => {}
|
return Err(Error::GenericError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user