Skip to content

Commit

Permalink
rgw: log unlink_instance mtime as object's mtime
Browse files Browse the repository at this point in the history
This is needed so that when squashing entries during data
sync we get a consistent mtime for that object.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
  • Loading branch information
yehudasa authored and cbodley committed Jan 18, 2018
1 parent c2d28e2 commit bef2260
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cls/rgw/cls_rgw.cc
Expand Up @@ -1673,7 +1673,7 @@ static int rgw_bucket_unlink_instance(cls_method_context_t hctx, bufferlist *in,
rgw_bucket_entry_ver ver;
ver.epoch = (op.olh_epoch ? op.olh_epoch : olh.get_epoch());

real_time mtime = real_clock::now(); /* mtime has no real meaning in instance removal context */
real_time mtime = obj.mtime(); /* mtime has no real meaning in instance removal context */
ret = log_index_operation(hctx, op.key, CLS_RGW_OP_UNLINK_INSTANCE, op.op_tag,
mtime, ver,
CLS_RGW_STATE_COMPLETE, header.ver, header.max_marker,
Expand Down

0 comments on commit bef2260

Please sign in to comment.