rebase main

Signed-off-by: junxiang Mu <1948535941@qq.com>
This commit is contained in:
junxiang Mu
2024-11-14 10:47:51 +08:00
parent be7d1ab0cc
commit caad7a38a4
22 changed files with 168 additions and 106 deletions
+8 -2
View File
@@ -419,7 +419,13 @@ impl Erasure {
till_offset
}
pub async fn heal(&self, writers: &mut [Option<BitrotWriter>], readers: Vec<Option<BitrotReader>>, total_length: usize, prefer: &[bool]) -> Result<()> {
pub async fn heal(
&self,
writers: &mut [Option<BitrotWriter>],
readers: Vec<Option<BitrotReader>>,
total_length: usize,
prefer: &[bool],
) -> Result<()> {
if writers.len() != self.parity_shards + self.data_shards {
return Err(Error::from_string("invalid argument"));
}
@@ -451,7 +457,7 @@ impl Erasure {
continue;
}
match w.as_mut().unwrap().write(shards[i].as_ref()).await {
Ok(_) => {},
Ok(_) => {}
Err(e) => errs.push(e),
}
}