mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-15 01:23:12 +00:00
chore(rio): drop a dead store in the poison guard and note the end-block branch
Review follow-up: the poison gate re-assigned an already-true flag, and the COMPRESS_TYPE_END branch reads as dead without stating that the writer never emits an end block — that absence is exactly what lets concatenated per-part streams decode as one.
This commit is contained in:
@@ -248,7 +248,6 @@ where
|
||||
return Poll::Ready(Ok(()));
|
||||
}
|
||||
if *this.poisoned {
|
||||
*this.poisoned = true;
|
||||
return Poll::Ready(Err(io::Error::new(io::ErrorKind::InvalidData, "decompress reader previously failed")));
|
||||
}
|
||||
|
||||
@@ -289,6 +288,9 @@ where
|
||||
(this.header_buf[1] as usize) | ((this.header_buf[2] as usize) << 8) | ((this.header_buf[3] as usize) << 16);
|
||||
*this.header_read = 0;
|
||||
|
||||
// `CompressReader` never emits an end block — a stream terminates on
|
||||
// inner EOF, which is what lets concatenated per-part streams decode as
|
||||
// one. This branch is kept for streams that do carry the marker.
|
||||
if typ == COMPRESS_TYPE_END {
|
||||
*this.compressed_read = 0;
|
||||
*this.compressed_len = 0;
|
||||
|
||||
@@ -1153,8 +1153,7 @@ pub(crate) mod multipart_usecase {
|
||||
}
|
||||
|
||||
pub(crate) use super::{
|
||||
access, bucket, compression, data_usage, error, helper, io, object_utils, options, request_context, s3_api,
|
||||
set_disk, sse,
|
||||
access, bucket, compression, data_usage, error, helper, io, object_utils, options, request_context, s3_api, set_disk, sse,
|
||||
};
|
||||
pub(crate) use crate::storage::storage_api::{ECStore, StorageObjectInfo, StorageObjectOptions, StoragePutObjReader};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user