Fixes: #12146
Config parameter added for no of parts limit in multipart upload and checked while
completing multipart upload
Signed-off-by: Abhishek Dixit <dixitabhi@gmail.com>
OPTION(rgw_user_quota_sync_wait_time, OPT_INT, 3600 * 24) // min time between two full stats sync for non-idle users
OPTION(rgw_multipart_min_part_size, OPT_INT, 5 * 1024 * 1024) // min size for each part (except for last one) in multipart upload
+OPTION(rgw_multipart_part_upload_limit, OPT_INT, 10000) // parts limit in multipart upload
OPTION(rgw_olh_pending_timeout_sec, OPT_INT, 3600) // time until we retire a pending olh change
return;
}
+ if (parts->parts.size() > s->cct->_conf->rgw_multipart_part_upload_limit) {
+ ret = -ERANGE;
+ return;
+ }
+
mp.init(s->object.name, upload_id);
meta_oid = mp.get_meta();