mirror of
https://github.com/ceph/ceph
synced 2025-01-30 06:53:38 +00:00
Merge pull request #33807 from ofriedma/wip-disable-range-prefetch
rgw: Disable prefetch of entire head object when GET request with ran… Reviewed-by: Matt Benjamin <mbenjami@redhat.com> Reviewed-by: Mark Kogan <mkogan@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
commit
e8811a0cfc
@ -2147,22 +2147,14 @@ bool RGWGetObj::prefetch_data()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool prefetch_first_chunk = true;
|
||||
range_str = s->info.env->get("HTTP_RANGE");
|
||||
|
||||
// TODO: add range prefetch
|
||||
if (range_str) {
|
||||
int r = parse_range();
|
||||
/* error on parsing the range, stop prefetch and will fail in execute() */
|
||||
if (r < 0) {
|
||||
return false; /* range_parsed==false */
|
||||
}
|
||||
/* range get goes to shadow objects, stop prefetch */
|
||||
if (ofs >= s->cct->_conf->rgw_max_chunk_size) {
|
||||
prefetch_first_chunk = false;
|
||||
}
|
||||
parse_range();
|
||||
return false;
|
||||
}
|
||||
|
||||
return get_data && prefetch_first_chunk;
|
||||
return get_data;
|
||||
}
|
||||
|
||||
void RGWGetObj::pre_exec()
|
||||
|
Loading…
Reference in New Issue
Block a user