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 <yguang@yahoo-inc.com>
(cherry picked from commit
366e8a85c0e9f00eed364eaebbfb6b672852eae9)
}
}
- r = flush_read_list(d);
- if (r < 0)
- return r;
-
get_obj_bucket_and_oid_loc(obj, bucket, oid, key);
d->throttle.get(len);
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: