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,
+3
View File
@@ -31,6 +31,9 @@ pub struct ObjectOptions {
pub delete_prefix_object: bool,
pub version_id: Option<String>,
pub no_lock: bool,
/// True when an upper layer already holds the object read lock before
/// forwarding a no_lock read to the set layer.
pub metadata_cache_safe: bool,
pub versioned: bool,
pub version_suspended: bool,