]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rgw: increment header version to avoid overwriting bilog entries 18271/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 12 Oct 2017 15:25:13 +0000 (11:25 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 12 Oct 2017 15:25:19 +0000 (11:25 -0400)
Fixes: http://tracker.ceph.com/issues/21772
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/cls/rgw/cls_rgw.cc

index f4a4f1a88abfc4727422da6b18fbf6f903de1e28..f699628518047be76fc06db362b5a1707e5c0908 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)