From 8eeee2b78d6f4176fb20c2b1499e3237ee229bf4 Mon Sep 17 00:00:00 2001 From: Jens Rosenboom Date: Mon, 26 Jun 2017 11:14:06 +0000 Subject: [PATCH] RGW: Fix duplicate tag removal during GC We need to remove all processed tags before we fetch a new batch of tags for removal, otherwise some tags might get processed twice. Fixes: http://tracker.ceph.com/issues/20107 Signed-off-by: Jens Rosenboom --- src/rgw/rgw_gc.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rgw/rgw_gc.cc b/src/rgw/rgw_gc.cc index c4ad79c18f6..67b8a5c33df 100644 --- a/src/rgw/rgw_gc.cc +++ b/src/rgw/rgw_gc.cc @@ -222,6 +222,10 @@ int RGWGC::process(int index, int max_secs) } } } + if (!remove_tags.empty()) { + RGWGC::remove(index, remove_tags); + remove_tags.clear(); + } } while (truncated); done: -- 2.47.3