]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: data sync squash, prioritize object removal
authorYehuda Sadeh <yehuda@redhat.com>
Sat, 4 Jun 2016 12:47:50 +0000 (05:47 -0700)
committerAbhishek Lekshmanan <abhishek@suse.com>
Thu, 14 Jul 2016 08:06:58 +0000 (10:06 +0200)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 2fcd8b1d49aae2fd03b986dd10bb3f98d3b8f32e)

src/rgw/rgw_data_sync.cc

index 160a512a8e27474c482494a48e095d1275ccd3af..474f89b8eeb5b9cbf5bd37de8ff6ec835ef3c8ff 100644 (file)
@@ -2344,7 +2344,10 @@ int RGWBucketShardIncrementalSyncCR::operate()
           continue;
         }
         auto& squash_entry = squash_map[e.object];
-        if (squash_entry.first <= e.timestamp) {
+        if (squash_entry.first == e.timestamp &&
+            e.op == CLS_RGW_OP_DEL) {
+          squash_entry.second = e.op;
+        } else if (squash_entry.first < e.timestamp) {
           squash_entry = make_pair<>(e.timestamp, e.op);
         }
       }