mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-16 09:58:21 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab387b849f |
@@ -1085,7 +1085,6 @@ where
|
|||||||
let data_shards = self.data_shards;
|
let data_shards = self.data_shards;
|
||||||
let read_timeout = self.read_timeout;
|
let read_timeout = self.read_timeout;
|
||||||
let metrics_path = self.metrics_path;
|
let metrics_path = self.metrics_path;
|
||||||
let read_costs = self.read_costs.clone();
|
|
||||||
let locality_preference_enabled = self.locality_preference_enabled;
|
let locality_preference_enabled = self.locality_preference_enabled;
|
||||||
let stripe_read_start = metrics_path.map(|_| Instant::now());
|
let stripe_read_start = metrics_path.map(|_| Instant::now());
|
||||||
|
|
||||||
@@ -1100,12 +1099,12 @@ where
|
|||||||
// before the retirement pass mutates `self.readers` below.
|
// before the retirement pass mutates `self.readers` below.
|
||||||
{
|
{
|
||||||
let mut sets = FuturesUnordered::new();
|
let mut sets = FuturesUnordered::new();
|
||||||
let reader_iter = ReaderLaunchIter::new(&mut self.readers, &read_costs, locality_preference_enabled);
|
let reader_iter = ReaderLaunchIter::new(&mut self.readers, self.read_costs.as_slice(), locality_preference_enabled);
|
||||||
for (i, reader) in reader_iter {
|
for (i, reader) in reader_iter {
|
||||||
if reader.is_none() || !participating[i] {
|
if reader.is_none() || !participating[i] {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let read_cost = read_costs.get(i).copied().unwrap_or(ShardReadCost::Unknown);
|
let read_cost = self.read_costs.get(i).copied().unwrap_or(ShardReadCost::Unknown);
|
||||||
let recycled_buf = bufs[i].take();
|
let recycled_buf = bufs[i].take();
|
||||||
scheduled += 1;
|
scheduled += 1;
|
||||||
sets.push(read_shard(
|
sets.push(read_shard(
|
||||||
@@ -1237,7 +1236,7 @@ where
|
|||||||
if !self.try_engage_parity(idx, stripe_index) {
|
if !self.try_engage_parity(idx, stripe_index) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let read_cost = read_costs.get(idx).copied().unwrap_or(ShardReadCost::Unknown);
|
let read_cost = self.read_costs.get(idx).copied().unwrap_or(ShardReadCost::Unknown);
|
||||||
let recycled_buf = Some(self.buffers.take(idx, shard_size));
|
let recycled_buf = Some(self.buffers.take(idx, shard_size));
|
||||||
scheduled += 1;
|
scheduled += 1;
|
||||||
let (i, _read_cost, result, _should_retire) = read_shard(
|
let (i, _read_cost, result, _should_retire) = read_shard(
|
||||||
|
|||||||
@@ -5109,7 +5109,7 @@ impl DefaultObjectUsecase {
|
|||||||
part_number: Option<usize>,
|
part_number: Option<usize>,
|
||||||
has_range: bool,
|
has_range: bool,
|
||||||
encryption_applied: bool,
|
encryption_applied: bool,
|
||||||
buffered_body: Option<Bytes>,
|
mut buffered_body: Option<Bytes>,
|
||||||
cache_hook_served: bool,
|
cache_hook_served: bool,
|
||||||
cache_hook_probed: bool,
|
cache_hook_probed: bool,
|
||||||
cache_fill_allowed: bool,
|
cache_fill_allowed: bool,
|
||||||
@@ -5125,7 +5125,7 @@ impl DefaultObjectUsecase {
|
|||||||
// ODC-16 (backlog#1121): when the ecstore hook or shared cold fill
|
// ODC-16 (backlog#1121): when the ecstore hook or shared cold fill
|
||||||
// already supplied this body, the request-level plan was built before
|
// already supplied this body, the request-level plan was built before
|
||||||
// the authoritative lookup. Serve it without planning a second time.
|
// the authoritative lookup. Serve it without planning a second time.
|
||||||
if cache_hook_served && let Some(bytes) = buffered_body.clone() {
|
if cache_hook_served && let Some(bytes) = buffered_body.take() {
|
||||||
return Ok(Self::build_memory_bytes_blob(
|
return Ok(Self::build_memory_bytes_blob(
|
||||||
bytes,
|
bytes,
|
||||||
response_content_length,
|
response_content_length,
|
||||||
|
|||||||
Reference in New Issue
Block a user