mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-31 17:28:12 +00:00
@@ -514,7 +514,9 @@ impl FolderScanner {
|
|||||||
let this_hash = hash_path(&folder.name);
|
let this_hash = hash_path(&folder.name);
|
||||||
let was_compacted = into.compacted;
|
let was_compacted = into.compacted;
|
||||||
|
|
||||||
loop {
|
// do not really loop
|
||||||
|
let mut times = 1;
|
||||||
|
while times > 0 {
|
||||||
let mut abandoned_children: DataUsageHashMap = if !into.compacted {
|
let mut abandoned_children: DataUsageHashMap = if !into.compacted {
|
||||||
self.old_cache.find_children_copy(this_hash.clone())
|
self.old_cache.find_children_copy(this_hash.clone())
|
||||||
} else {
|
} else {
|
||||||
@@ -902,7 +904,7 @@ impl FolderScanner {
|
|||||||
scan(&this, into, self).await;
|
scan(&this, into, self).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
times -= 1;
|
||||||
}
|
}
|
||||||
if !was_compacted {
|
if !was_compacted {
|
||||||
self.new_cache.replace_hashed(&this_hash, &Some(folder.parent.clone()), into);
|
self.new_cache.replace_hashed(&this_hash, &Some(folder.parent.clone()), into);
|
||||||
|
|||||||
@@ -326,7 +326,6 @@ impl HealSequence {
|
|||||||
count
|
count
|
||||||
};
|
};
|
||||||
|
|
||||||
loop {
|
|
||||||
match resp_rx.recv().await {
|
match resp_rx.recv().await {
|
||||||
Some(mut res) => {
|
Some(mut res) => {
|
||||||
if res.err.is_none() {
|
if res.err.is_none() {
|
||||||
@@ -348,9 +347,7 @@ impl HealSequence {
|
|||||||
if let Some(err) = res.err.as_ref() {
|
if let Some(err) = res.err.as_ref() {
|
||||||
res.result.detail = err.to_string();
|
res.result.detail = err.to_string();
|
||||||
}
|
}
|
||||||
if res.result.parity_blocks > 0
|
if res.result.parity_blocks > 0 && res.result.data_blocks > 0 && res.result.data_blocks > res.result.parity_blocks
|
||||||
&& res.result.data_blocks > 0
|
|
||||||
&& res.result.data_blocks > res.result.parity_blocks
|
|
||||||
{
|
{
|
||||||
let got = count_ok_drives(&res.result.after);
|
let got = count_ok_drives(&res.result.after);
|
||||||
if got < res.result.parity_blocks {
|
if got < res.result.parity_blocks {
|
||||||
@@ -365,7 +362,6 @@ impl HealSequence {
|
|||||||
None => return Ok(()),
|
None => return Ok(()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
async fn heal_disk_meta(h: Arc<RwLock<HealSequence>>) -> Result<()> {
|
async fn heal_disk_meta(h: Arc<RwLock<HealSequence>>) -> Result<()> {
|
||||||
HealSequence::heal_rustfs_sys_meta(h, CONFIG_PREFIX).await
|
HealSequence::heal_rustfs_sys_meta(h, CONFIG_PREFIX).await
|
||||||
|
|||||||
Reference in New Issue
Block a user