mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-22 04:16:38 +00:00
fix(ecstore): classify remote inline early-stop misses (#6136)
This commit is contained in:
@@ -666,7 +666,8 @@ pub(in crate::set_disk) async fn data_read_early_stop_inline_body_miss_reason(
|
|||||||
parts_metadata: &[FileInfo],
|
parts_metadata: &[FileInfo],
|
||||||
disks: &[Option<DiskStore>],
|
disks: &[Option<DiskStore>],
|
||||||
) -> Option<&'static str> {
|
) -> Option<&'static str> {
|
||||||
if !candidate.inline_data() {
|
// `inline_data` excludes remote objects; this diagnostic reports them separately.
|
||||||
|
if !rustfs_utils::http::contains_key_str(&candidate.metadata, rustfs_utils::http::SUFFIX_INLINE_DATA) {
|
||||||
return Some(GET_METADATA_EARLY_STOP_REASON_DATA_READ_INLINE_NOT_INLINE);
|
return Some(GET_METADATA_EARLY_STOP_REASON_DATA_READ_INLINE_NOT_INLINE);
|
||||||
}
|
}
|
||||||
if candidate.is_compressed()
|
if candidate.is_compressed()
|
||||||
@@ -6369,6 +6370,13 @@ mod tests {
|
|||||||
Some(GET_METADATA_EARLY_STOP_REASON_DATA_READ_INLINE_NOT_INLINE)
|
Some(GET_METADATA_EARLY_STOP_REASON_DATA_READ_INLINE_NOT_INLINE)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let mut remote = candidate.clone();
|
||||||
|
remote.transition_status = TRANSITION_COMPLETE.to_string();
|
||||||
|
assert_eq!(
|
||||||
|
data_read_early_stop_inline_body_miss_reason(bucket, object, &remote, &parts_metadata, &disks).await,
|
||||||
|
Some(GET_METADATA_EARLY_STOP_REASON_DATA_READ_INLINE_REMOTE)
|
||||||
|
);
|
||||||
|
|
||||||
let mut transformed = candidate.clone();
|
let mut transformed = candidate.clone();
|
||||||
rustfs_utils::http::insert_str(&mut transformed.metadata, rustfs_utils::http::SUFFIX_COMPRESSION, "zstd".to_string());
|
rustfs_utils::http::insert_str(&mut transformed.metadata, rustfs_utils::http::SUFFIX_COMPRESSION, "zstd".to_string());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|||||||
Reference in New Issue
Block a user