]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: lc: fix infinite loop in bucket_lc_prepare 38465/head
authorIlsoo Byun <ilsoobyun@linecorp.com>
Mon, 7 Dec 2020 06:20:53 +0000 (15:20 +0900)
committerIlsoo Byun <ilsoobyun@linecorp.com>
Mon, 7 Dec 2020 14:14:25 +0000 (23:14 +0900)
Signed-off-by: Ilsoo Byun <ilsoobyun@linecorp.com>
src/rgw/rgw_sal_rados.cc

index 043a9837515f9226109a121db1864c3256f0866b..b0a7664ceb2f625a751b288bacf5ac00e03e704f 100644 (file)
@@ -1208,6 +1208,8 @@ int RadosLifecycle::set_entry(const string& oid, const LCEntry& entry)
 int RadosLifecycle::list_entries(const string& oid, const string& marker,
                                 uint32_t max_entries, vector<LCEntry>& entries)
 {
+  entries.clear();
+
   vector<cls_rgw_lc_entry> cls_entries;
   int ret = cls_rgw_lc_list(*store->getRados()->get_lc_pool_ctx(), oid, marker, max_entries, cls_entries);