From: Casey Bodley Date: Thu, 12 Oct 2017 15:25:13 +0000 (-0400) Subject: cls/rgw: increment header version to avoid overwriting bilog entries X-Git-Tag: v12.2.2~84^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=34cd96d3425dcea4053ce0514632194dd7b2eaab;p=ceph.git cls/rgw: increment header version to avoid overwriting bilog entries Fixes: http://tracker.ceph.com/issues/21772 Signed-off-by: Casey Bodley (cherry picked from commit 081ba106a910583851b9acdcaf5971e37a439329) --- diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index 17a618053a6..5a950b1ce64 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -935,6 +935,7 @@ int rgw_bucket_complete_op(cls_method_context_t hctx, bufferlist *in, bufferlist unaccount_entry(header, remove_entry); if (op.log_op && !header.syncstopped) { + ++header.ver; // increment index version, or we'll overwrite keys previously written rc = log_index_operation(hctx, remove_key, CLS_RGW_OP_DEL, op.tag, remove_entry.meta.mtime, remove_entry.ver, CLS_RGW_STATE_COMPLETE, header.ver, header.max_marker, op.bilog_flags, NULL, NULL, &op.zones_trace); if (rc < 0)