]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Replace COMPLETE_MULTIPART_MAX_LEN with configurable rgw_max_put_param_size 26070/head
authorLei Liu <liul.stone@gmail.com>
Tue, 22 Jan 2019 04:09:45 +0000 (12:09 +0800)
committerLei Liu <liul.stone@gmail.com>
Tue, 29 Jan 2019 14:40:33 +0000 (22:40 +0800)
Fixes: http://tracker.ceph.com/issues/38002
Signed-off-by: Lei Liu <liul.stone@gmail.com>
src/rgw/rgw_rest.cc

index d5eb818986a552ed1c99d952f4fa6a72cc610ae4..c1cd458eac37b86ce931d74ed7ba8f25ac6caaa1 100644 (file)
@@ -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;