From: Pavan Rallabhandi Date: Wed, 8 Nov 2017 16:05:54 +0000 (+0530) Subject: rgw: Fix swift object expiry not deleting objects X-Git-Tag: v12.2.3~218^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=05b60db8ef1999bb7a75f7cbbc721f64e67cec48;p=ceph.git rgw: Fix swift object expiry not deleting objects 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 (cherry picked from commit 70adfaae5073d2680a9722526a6a19795dd18780) --- diff --git a/src/cls/timeindex/cls_timeindex.cc b/src/cls/timeindex/cls_timeindex.cc index bed96e5cd74d..5717471d8c1f 100644 --- a/src/cls/timeindex/cls_timeindex.cc +++ b/src/cls/timeindex/cls_timeindex.cc @@ -137,7 +137,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()); @@ -156,6 +155,7 @@ static int cls_timeindex_list(cls_method_context_t hctx, e.value = bl; entries.push_back(e); } + marker = index; } ret.marker = marker;