fix readme

Signed-off-by: junxiang Mu <1948535941@qq.com>
This commit is contained in:
junxiang Mu
2025-04-28 06:25:20 +00:00
committed by weisd
parent 738a81e50e
commit cdcf5d0917
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ observability data formats (e.g. Jaeger, Prometheus, etc.) sending to one or mor
2. Run the following command: 2. Run the following command:
```bash ```bash
docker-compose -f docker-compose.yml up -d docker compose -f docker-compose.yml up -d
``` ```
3. Access the Grafana dashboard by navigating to `http://localhost:3000` in your browser. The default username and 3. Access the Grafana dashboard by navigating to `http://localhost:3000` in your browser. The default username and
+2 -2
View File
@@ -470,7 +470,7 @@ impl Erasure {
self.encoder.as_ref().unwrap().reconstruct(&mut bufs)?; self.encoder.as_ref().unwrap().reconstruct(&mut bufs)?;
} }
let shards = bufs.into_iter().flatten().collect::<Vec<_>>(); let shards = bufs.into_iter().flatten().map(Bytes::from).collect::<Vec<_>>();
if shards.len() != self.parity_shards + self.data_shards { if shards.len() != self.parity_shards + self.data_shards {
return Err(Error::from_string("can not reconstruct data")); return Err(Error::from_string("can not reconstruct data"));
} }
@@ -479,7 +479,7 @@ impl Erasure {
if w.is_none() { if w.is_none() {
continue; continue;
} }
match w.as_mut().unwrap().write(shards[i].clone().into()).await { match w.as_mut().unwrap().write(shards[i].clone()).await {
Ok(_) => {} Ok(_) => {}
Err(e) => { Err(e) => {
info!("write failed, err: {:?}", e); info!("write failed, err: {:?}", e);