]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Fix swift object expiry not deleting objects 18925/head
authorPavan Rallabhandi <PRallabhandi@walmartlabs.com>
Wed, 8 Nov 2017 16:05:54 +0000 (21:35 +0530)
committerJ. Eric Ivancich <ivancich@redhat.com>
Tue, 9 Jan 2018 18:22:24 +0000 (13:22 -0500)
In cls_timeindex_list() though `to_index` has expired for a timespan, the marker is set for a subsequent index during the time boundary check.
This marker is further returned to RGWObjectExpirer::process_single_shard(), where this out_marker is trimmed from the respective shard,
resulting in a lost removal hint and a leaked object.

Fixes: http://tracker.ceph.com/issues/22084
Signed-off-by: Pavan Rallabhandi <PRallabhandi@walmartlabs.com>
(cherry picked from commit 70adfaae5073d2680a9722526a6a19795dd18780)

src/cls/timeindex/cls_timeindex.cc

index 3300362a3ee497b7a898d6e89ee27c3c4e0642f7..1e6cfa27ae859955bbef66ebb7035f33e99c5ed5 100644 (file)
@@ -151,7 +151,6 @@ static int cls_timeindex_list(cls_method_context_t hctx,
     const string& index = iter->first;
     bufferlist& bl = iter->second;
 
-    marker = index;
     if (use_time_boundary && index.compare(0, to_index.size(), to_index) >= 0) {
       CLS_LOG(20, "DEBUG: cls_timeindex_list: finishing on to_index=%s",
               to_index.c_str());
@@ -170,6 +169,7 @@ static int cls_timeindex_list(cls_method_context_t hctx,
       e.value = bl;
       entries.push_back(e);
     }
+    marker = index;
   }
 
   if (iter == keys.end()) {