From 7bc4c09ccd97d1e20d0c17d6cb5768f37e16ba55 Mon Sep 17 00:00:00 2001 From: Lei Liu Date: Tue, 22 Jan 2019 12:09:45 +0800 Subject: [PATCH] rgw: Replace COMPLETE_MULTIPART_MAX_LEN with configurable rgw_max_put_param_size Fixes: http://tracker.ceph.com/issues/38002 Signed-off-by: Lei Liu --- src/rgw/rgw_rest.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index d5eb818986a55..c1cd458eac37b 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -1550,8 +1550,8 @@ int RGWCompleteMultipart_ObjStore::get_params() return op_ret; } -#define COMPLETE_MULTIPART_MAX_LEN (1024 * 1024) /* api defines max 10,000 parts, this should be enough */ - std::tie(op_ret, data) = rgw_rest_read_all_input(s, COMPLETE_MULTIPART_MAX_LEN); + const auto max_size = s->cct->_conf->rgw_max_put_param_size; + std::tie(op_ret, data) = rgw_rest_read_all_input(s, max_size); if (op_ret < 0) return op_ret; -- 2.39.5