mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
test get_format_file_in_quorum
This commit is contained in:
@@ -127,8 +127,15 @@ fn get_format_file_in_quorum(formats: &[Option<FormatV3>]) -> Result<FormatV3> {
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user