From: Pritha Srivastava Date: Tue, 17 Jun 2025 06:07:16 +0000 (+0530) Subject: rgw/d4n: fix for rgw user create hanging when vstart X-Git-Tag: testing/wip-vshankar-testing-20250829.190601-debug~16^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6c47dd9abca8ba877a6a27c436ff85f4747058f6;p=ceph-ci.git rgw/d4n: fix for rgw user create hanging when vstart cluster starts when there is data in cache. the cleaning thread sleeps when the entry for cleaning has not expired, therefore radosgw-admin user create hangs when vstart cluster comes up. Signed-off-by: Pritha Srivastava --- diff --git a/src/rgw/driver/d4n/d4n_policy.cc b/src/rgw/driver/d4n/d4n_policy.cc index d2d9834c3f0..523c58f8372 100644 --- a/src/rgw/driver/d4n/d4n_policy.cc +++ b/src/rgw/driver/d4n/d4n_policy.cc @@ -973,7 +973,11 @@ void LFUDAPolicy::cleaning(const DoutPrefixProvider* dpp) erase_dirty_object(dpp, e->key, null_yield); } } else if (diff < interval) { //end-if std::difftime(time(NULL), e->creationTime) > interval - std::this_thread::sleep_for(std::chrono::seconds(interval - diff)); + { + std::unique_lock wait_lock(lfuda_cleaning_lock); + cond.wait_for(wait_lock, std::chrono::seconds(interval - diff), []{ return quit.load(); }); + } + continue; } } //end-while true }