mirror of
https://github.com/ceph/ceph
synced 2025-02-20 17:37:29 +00:00
Merge pull request #38905 from cbodley/wip-48874
rgw: fix trailing null in object names of multipart reuploads
This commit is contained in:
commit
d358f62397
@ -336,8 +336,7 @@ int MultipartObjectProcessor::process_first_chunk(bufferlist&& data,
|
||||
int r = writer.write_exclusive(data);
|
||||
if (r == -EEXIST) {
|
||||
// randomize the oid prefix and reprepare the head/manifest
|
||||
std::string oid_rand(32, 0);
|
||||
gen_rand_alphanumeric(store->ctx(), oid_rand.data(), oid_rand.size());
|
||||
std::string oid_rand = gen_rand_alphanumeric(store->ctx(), 32);
|
||||
|
||||
mp.init(target_obj->get_name(), upload_id, oid_rand);
|
||||
manifest.set_prefix(target_obj->get_name() + "." + oid_rand);
|
||||
|
Loading…
Reference in New Issue
Block a user