]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/gc: fixing the condition when marker for a queue is 37666/head
authorPritha Srivastava <prsrivas@redhat.com>
Wed, 14 Oct 2020 11:05:50 +0000 (16:35 +0530)
committerPritha Srivastava <prsrivas@redhat.com>
Tue, 20 Oct 2020 06:27:06 +0000 (11:57 +0530)
commitbf3f3ba675d092f48e403826fc0813e23c07045d
tree580f5d5b6d5c652529d00b9158462e86a4abee93
parent473d8e9a6066edace841e7580245f624d0afaab1
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>
src/rgw/rgw_gc.cc