From 34cd96d3425dcea4053ce0514632194dd7b2eaab Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 12 Oct 2017 11:25:13 -0400 Subject: [PATCH] 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) --- src/cls/rgw/cls_rgw.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index 17a618053a61e..5a950b1ce6488 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) -- 2.39.5