]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW: Fix duplicate tag removal during GC 16708/head
authorJens Rosenboom <j.rosenboom@x-ion.de>
Mon, 26 Jun 2017 11:14:06 +0000 (11:14 +0000)
committerMatt Benjamin <mbenjamin@redhat.com>
Thu, 1 Feb 2018 15:22:34 +0000 (10:22 -0500)
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 <j.rosenboom@x-ion.de>
(cherry picked from commit 8eeee2b78d6f4176fb20c2b1499e3237ee229bf4)

src/rgw/rgw_gc.cc

index 23061039ff09999d8820911e3882d080a77bca8e..ab0af8fbbc0dfe326b3e2f6be71d5fa37e9830a4 100644 (file)
@@ -226,6 +226,10 @@ int RGWGC::process(int index, int max_secs)
         }
       }
     }
+    if (!remove_tags.empty()) {
+      RGWGC::remove(index, remove_tags);
+      remove_tags.clear();
+    }
   } while (truncated);
 
 done: