std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes)
+ prefix_map_t& processed_prefixes,
+ const char *if_match,
+ const char *if_nomatch)
{
//call next->complete to complete writing the object to the backend store
auto ret = next->complete(dpp, y, cct, part_etags, remove_objs, accounted_size,
std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes) override;
+ prefix_map_t& processed_prefixes,
+ const char *if_match = nullptr,
+ const char *if_nomatch = nullptr) override;
};
} } // namespace rgw::sal
std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes)
+ prefix_map_t& processed_prefixes,
+ const char *if_match,
+ const char *if_nomatch)
{
char final_etag[CEPH_CRYPTO_MD5_DIGESTSIZE];
char final_etag_str[CEPH_CRYPTO_MD5_DIGESTSIZE * 2 + 16];
std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes) override;
+ prefix_map_t& processed_prefixes,
+ const char *if_match = nullptr,
+ const char *if_nomatch = nullptr) override;
virtual int cleanup_orphaned_parts(const DoutPrefixProvider *dpp,
CephContext *cct, optional_yield y,
const rgw_obj& obj,
std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes)
+ prefix_map_t& processed_prefixes,
+ const char *if_match,
+ const char *if_nomatch)
{
char final_etag[CEPH_CRYPTO_MD5_DIGESTSIZE];
char final_etag_str[CEPH_CRYPTO_MD5_DIGESTSIZE * 2 + 16];
std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes) override;
+ prefix_map_t& processed_prefixes,
+ const char *if_match = nullptr,
+ const char *if_nomatch = nullptr) override;
virtual int cleanup_orphaned_parts(const DoutPrefixProvider *dpp,
CephContext *cct, optional_yield y,
const rgw_obj& obj,
obj_op.meta.delete_at = delete_at;
obj_op.meta.zones_trace = zones_trace;
obj_op.meta.modify_tail = true;
+ obj_op.meta.if_match = if_match;
+ obj_op.meta.if_nomatch = if_nomatch;
r = obj_op.write_meta(actual_size, accounted_size, attrs, rctx,
writer.get_trace(), flags & rgw::sal::FLAG_LOG_OP);
obj_op.meta.modify_tail = true;
obj_op.meta.keep_tail = keep_tail;
obj_op.meta.appendable = true;
+ obj_op.meta.if_match = if_match;
+ obj_op.meta.if_nomatch = if_nomatch;
//Add the append part number
bufferlist cur_part_num_bl;
using ceph::encode;
std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes)
+ prefix_map_t& processed_prefixes,
+ const char *if_match,
+ const char *if_nomatch)
{
char final_etag[CEPH_CRYPTO_MD5_DIGESTSIZE];
char final_etag_str[CEPH_CRYPTO_MD5_DIGESTSIZE * 2 + 16];
obj_op.meta.modify_tail = true;
obj_op.meta.completeMultipart = true;
obj_op.meta.olh_epoch = olh_epoch;
+ obj_op.meta.if_match = if_match;
+ obj_op.meta.if_nomatch = if_nomatch;
const req_context rctx{dpp, y, nullptr};
ret = obj_op.write_meta(ofs, accounted_size, attrs, rctx, get_trace());
std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes) override;
+ prefix_map_t& processed_prefixes,
+ const char *if_match = nullptr,
+ const char *if_nomatch = nullptr) override;
virtual int cleanup_orphaned_parts(const DoutPrefixProvider *dpp,
CephContext *cct, optional_yield y,
const rgw_obj& obj,
op_ret =
upload->complete(this, y, s->cct, parts->parts, remove_objs, accounted_size,
compressed, cs_info, ofs, s->req_id, s->owner, olh_epoch,
- s->object.get(), processed_prefixes);
+ s->object.get(), processed_prefixes, if_match, if_nomatch);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: upload complete failed ret=" << op_ret << dendl;
return;
std::optional<rgw::cksum::Cksum> cksum;
std::optional<std::string> armored_cksum;
off_t ofs = 0;
+ const char *if_match{nullptr};
+ const char *if_nomatch{nullptr};
public:
RGWCompleteMultipart() {}
return ret;
}
+ if_match = s->info.env->get("HTTP_IF_MATCH");
+ if_nomatch = s->info.env->get("HTTP_IF_NONE_MATCH");
+
map_qs_metadata(s, true);
return do_aws4_auth_completion();
std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes) = 0;
+ prefix_map_t& processed_prefixes,
+ const char *if_match = nullptr,
+ const char *if_nomatch = nullptr) = 0;
/** Cleanup orphaned parts caused by racing condition involving part upload retry */
virtual int cleanup_orphaned_parts(const DoutPrefixProvider *dpp,
CephContext *cct, optional_yield y,
std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes)
+ prefix_map_t& processed_prefixes,
+ const char *if_match,
+ const char *if_nomatch)
{
char final_etag[CEPH_CRYPTO_MD5_DIGESTSIZE];
char final_etag_str[CEPH_CRYPTO_MD5_DIGESTSIZE * 2 + 16];
std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes) override;
+ prefix_map_t& processed_prefixes,
+ const char *if_match = nullptr,
+ const char *if_nomatch = nullptr) override;
virtual int cleanup_orphaned_parts(const DoutPrefixProvider *dpp,
CephContext *cct, optional_yield y,
const rgw_obj& obj,
std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes)
+ prefix_map_t& processed_prefixes,
+ const char *if_match,
+ const char *if_nomatch)
{
return next->complete(dpp, y, cct, part_etags, remove_objs, accounted_size,
compressed, cs_info, ofs, tag, owner, olh_epoch,
std::string& tag, ACLOwner& owner,
uint64_t olh_epoch,
rgw::sal::Object* target_obj,
- prefix_map_t& processed_prefixes) override;
+ prefix_map_t& processed_prefixes,
+ const char *if_match = nullptr,
+ const char *if_nomatch = nullptr) override;
virtual int cleanup_orphaned_parts(const DoutPrefixProvider *dpp,
CephContext *cct, optional_yield y,
const rgw_obj& obj,