RGW_OBJ_CATEGORY_MAIN,
versioned_epoch,
0, /* delete_at */
- NULL, /* string *version_id, */
+ &key.instance, /* string *version_id, */
NULL, /* string *ptag, */
NULL, /* string *petag, */
NULL, /* struct rgw_err *err, */
yield {
int r;
if (op == CLS_RGW_OP_ADD) {
+ ldout(store->ctx(), 5) << "bucket sync: sync obj: " << source_zone << "/" << bucket_info->bucket << "/" << key << "[" << versioned_epoch << "]" << dendl;
r = call(new RGWFetchRemoteObjCR(async_rados, store, source_zone, *bucket_info,
key, versioned_epoch,
true));
RGWPutObjProcessor_Atomic processor(obj_ctx,
dest_bucket_info, dest_obj.bucket, dest_obj.get_orig_obj(),
cct->_conf->rgw_obj_stripe_size, tag, dest_bucket_info.versioning_enabled());
+ processor.set_version_id(dest_obj.get_instance());
int ret = processor.prepare(this, NULL);
if (ret < 0) {
return ret;
if (prepend_metadata) {
params.push_back(pair<string, string>(RGW_SYS_PARAM_PREFIX "prepend-metadata", zone_group));
}
+ if (!obj.get_instance().empty()) {
+ const string& instance = obj.get_instance();
+ params.push_back(pair<string, string>("versionId", instance));
+ }
*req = new RGWRESTStreamReadRequest(cct, url, cb, NULL, ¶ms);
map<string, string> extra_headers;
if (info) {