rgw: fix compile error for appending object

Signed-off-by: zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
This commit is contained in:
zhang Shaowen 2018-11-21 14:58:27 +08:00
parent 03be834728
commit 5197c69ee5
2 changed files with 4 additions and 4 deletions

View File

@ -404,9 +404,9 @@ Syntax
Append Object
----------
-------------
Append data to an object. You must have write permissions on the bucket to perform this operation.
It is used to upload files in appending mode.The type of the objects created by the Append Object
It is used to upload files in appending mode. The type of the objects created by the Append Object
operation is Appendable Object, and the type of the objects uploaded with the Put Object operation is Normal Object.
**Append Object can't be used if bucket versioning is enabled.**

View File

@ -605,13 +605,13 @@ int AppendObjectProcessor::complete(size_t accounted_size, const string &etag, c
if (r < 0) {
return r;
}
obj_ctx.obj.set_atomic(head_obj);
obj_ctx.set_atomic(head_obj);
RGWRados::Object op_target(store, bucket_info, obj_ctx, head_obj);
//For Append obj, disable versioning
op_target.set_versioning_disabled(true);
RGWRados::Object::Write obj_op(&op_target);
if (cur_manifest) {
cur_manifest->append(manifest, store);
cur_manifest->append(manifest, store->svc.zone);
obj_op.meta.manifest = cur_manifest;
} else {
obj_op.meta.manifest = &manifest;