fix: harden GET object performance paths (#4271)

* fix: harden GET object performance paths

* fix: satisfy GET multipart layer guard

* fix: keep v1 list markers S3 compatible

* perf: tighten GET direct-memory decision

* ci: isolate s3tests from scanner workload

* refactor: simplify get object body lifecycle

* fix: satisfy get object clippy
This commit is contained in:
houseme
2026-07-05 12:03:22 +08:00
committed by GitHub
parent a134717249
commit db277b17a4
12 changed files with 1092 additions and 157 deletions
+15
View File
@@ -371,6 +371,9 @@ impl MetadataQuorumAccumulator {
/// Check if a versioned request can early-stop because the requested
/// version_id has reached quorum across disks.
fn version_early_stop_decision(&self) -> Option<MetadataEarlyStopDecision> {
if !self.allow_early_stop {
return None;
}
if self.requested_version_id.is_empty() {
return None;
}
@@ -4388,6 +4391,18 @@ mod tests {
MetadataQuorumAccumulator::new(4, 2, true).with_requested_version_id(requested_version_id)
}
#[test]
fn version_early_stop_respects_disabled_accumulator() {
let vid = Uuid::new_v4();
let mut accumulator = MetadataQuorumAccumulator::new(4, 2, false).with_requested_version_id(&vid.to_string());
accumulator.observe_file_info(&version_early_stop_candidate("object", 1, vid));
accumulator.observe_file_info(&version_early_stop_candidate("object", 2, vid));
assert!(accumulator.version_early_stop_decision().is_none());
assert_eq!(accumulator.matching_version_votes, 2);
}
#[test]
fn version_early_stop_hits_quorum_with_matching_versions() {
let vid = Uuid::new_v4();