]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/gc: fixing the condition when marker for a queue is 37846/head
authorPritha Srivastava <prsrivas@redhat.com>
Wed, 14 Oct 2020 11:05:50 +0000 (16:35 +0530)
committerNathan Cutler <ncutler@suse.com>
Tue, 27 Oct 2020 08:54:09 +0000 (09:54 +0100)
commit6ceab5de1b04aab0b2f5f6a664181af5999e8c1e
treef74b291a5fc6def1d63d99fbd22e499f68e8c105
parentb6d6e254979727c5d5ae5386f42bf220a508269a
rgw/gc: fixing the condition when marker for a queue is
always reset to empty which causes RGWGC::list to get stuck in
a loop, which ultimately is broken out of when the queue's truncated
flag is false.

1. Check for entries size also while evaluating whether objects cache for
a gc object should be marked as 'transitioned' in case of cls_rgw_gc_list.
When there are no entries, we get back a return value of 0, and the
object cache is not marked as 'transitioned'.

2. Also for the last gc object, we need to check whether the queue is still
under process and set the correct flag.

Missing the two conditions above causes the GC::list to loop continously
over the same gc object.

Fixes: https://tracker.ceph.com/issues/47909
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit bf3f3ba675d092f48e403826fc0813e23c07045d)
src/rgw/rgw_gc.cc