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:
overtrue
2026-08-14 08:36:24 +08:00
parent f48aa76cd7
commit 42a44b51d9
2 changed files with 4 additions and 3 deletions
+3 -1
View File
@@ -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;
+1 -2
View File
@@ -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};
}