fix: verify_file bug
This commit is contained in:
weisd
2025-04-24 15:14:57 +08:00
parent a745b91ded
commit 56575d58f4
3 changed files with 11 additions and 6 deletions
+8 -3
View File
@@ -1,4 +1,5 @@
use ecstore::{
config::error::is_err_config_not_found,
new_object_layer_fn,
notification_sys::get_global_notification_sys,
rebalance::{DiskStat, RebalSaveOpt},
@@ -128,9 +129,13 @@ impl Operation for RebalanceStatus {
};
let mut meta = RebalanceMeta::new();
meta.load(store.pools[0].clone())
.await
.map_err(|e| s3_error!(InternalError, "Failed to load rebalance meta: {}", e))?;
if let Err(err) = meta.load(store.pools[0].clone()).await {
if is_err_config_not_found(&err) {
return Err(s3_error!(NoSuchResource, "Pool rebalance is not started"));
}
return Err(s3_error!(InternalError, "Failed to load rebalance meta: {}", err));
}
// Compute disk usage percentage
let si = store.storage_info().await;