From aa8135a1adfc83849cb1befe41c9cfb869f26cd3 Mon Sep 17 00:00:00 2001 From: weisd Date: Wed, 11 Sep 2024 15:19:59 +0800 Subject: [PATCH] test get_format_file_in_quorum --- ecstore/src/store_init.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ecstore/src/store_init.rs b/ecstore/src/store_init.rs index e18ebe13..1a09e6ee 100644 --- a/ecstore/src/store_init.rs +++ b/ecstore/src/store_init.rs @@ -127,8 +127,15 @@ fn get_format_file_in_quorum(formats: &[Option]) -> Result { let (max_drives, max_count) = countmap.iter().max_by_key(|&(_, c)| c).unwrap_or((&0, &0)); + warn!("get_format_file_in_quorum fi: {:?}", &formats); + if *max_drives == 0 || *max_count < formats.len() / 2 { - warn!("*max_drives == 0 || *max_count < formats.len() / 2"); + warn!( + "*max_drives == 0 || *max_count < formats.len() / 2, {} || {}<{}", + max_drives, + max_count, + formats.len() / 2 + ); return Err(Error::new(ErasureError::ErasureReadQuorum)); }