This commit is contained in:
weisd
2025-04-07 10:52:15 +08:00
parent cb82b0aac8
commit b740e53110
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -709,6 +709,11 @@ impl ECStore {
}
fn decommission_object(&self, id: usize, bucket: String, rd: GetObjectReader) -> Result<()> {
let object_info = rd.object_info;
let actual_size = object_info.get_actual_size()?;
if object_info.is_multipart() {}
unimplemented!()
}
}
+4
View File
@@ -725,6 +725,10 @@ impl ObjectInfo {
}
}
pub fn is_multipart(&self) -> bool {
self.etag.as_ref().is_some_and(|v| v.len() != 32)
}
pub fn get_actual_size(&self) -> Result<usize> {
if let Some(actual_size) = self.actual_size {
return Ok(actual_size);