Skip to content

Commit

Permalink
cls/rgw: increment header version to avoid overwriting bilog entries
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/21772

Signed-off-by: Casey Bodley <[email protected]>
  • Loading branch information
cbodley committed Oct 12, 2017
1 parent 1c14d4d commit 081ba10
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cls/rgw/cls_rgw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 081ba10

Please sign in to comment.