From: Guang Yang Date: Fri, 3 Apr 2015 12:27:04 +0000 (+0000) Subject: rgw : Issue AIO for next chunk first before flush the (cached) data. X-Git-Tag: v9.0.1~168^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=366e8a85c0e9f00eed364eaebbfb6b672852eae9;p=ceph.git rgw : Issue AIO for next chunk first before flush the (cached) data. When handling GET request for large object (with multiple chunks), currently it will first flush the cached data, and then issue AIO request for next chunk, this has the potential issue to make the retriving from OSD and sending to client serialized. This patch switch the two operations. Fixes: 11322 Signed-off-by: Guang Yang --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 5183747aff33..449ee388b8ca 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -5677,10 +5677,6 @@ int RGWRados::get_obj_iterate_cb(RGWObjectCtx *ctx, RGWObjState *astate, } } - r = flush_read_list(d); - if (r < 0) - return r; - get_obj_bucket_and_oid_loc(obj, bucket, oid, key); d->throttle.get(len); @@ -5704,6 +5700,11 @@ int RGWRados::get_obj_iterate_cb(RGWObjectCtx *ctx, RGWObjState *astate, if (r < 0) goto done_err; + // Flush data to client if there is any + r = flush_read_list(d); + if (r < 0) + return r; + return 0; done_err: