]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw: increment header version to avoid overwriting bilog entries 18334/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 12 Oct 2017 15:25:13 +0000 (11:25 -0400)
committerKarol Mroz <kmroz@suse.de>
Mon, 16 Oct 2017 22:35:07 +0000 (15:35 -0700)
Fixes: http://tracker.ceph.com/issues/21772
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 081ba106a910583851b9acdcaf5971e37a439329)

src/cls/rgw/cls_rgw.cc

index 17a618053a61effcb2185ba148fa93bf411b7bbe..5a950b1ce6488f6fde9a005dba5c584b9fd4efa4 100644 (file)
@@ -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)