feat: optimize small GET read paths (#4022)

This commit is contained in:
houseme
2026-07-01 15:40:00 +08:00
committed by GitHub
parent b0f491549a
commit b16120dbcc
25 changed files with 5318 additions and 502 deletions
+4
View File
@@ -277,6 +277,7 @@ impl PutObjReader {
pub struct GetObjectReader {
pub stream: Box<dyn AsyncRead + Unpin + Send + Sync>,
pub object_info: ObjectInfo,
pub buffered_body: Option<Bytes>,
}
#[derive(Debug, Clone, Copy)]
@@ -529,6 +530,7 @@ impl ReadPlan {
GetObjectReader {
stream: reader,
object_info: oi.clone(),
buffered_body: None,
},
self.storage_offset,
self.storage_length,
@@ -582,6 +584,7 @@ impl ReadPlan {
GetObjectReader {
stream: final_reader,
object_info,
buffered_body: None,
},
self.storage_offset,
self.storage_length,
@@ -682,6 +685,7 @@ impl ReadPlan {
GetObjectReader {
stream: final_reader,
object_info,
buffered_body: None,
},
self.storage_offset,
self.storage_length,