From 6c47dd9abca8ba877a6a27c436ff85f4747058f6 Mon Sep 17 00:00:00 2001 From: Pritha Srivastava Date: Tue, 17 Jun 2025 11:37:16 +0530 Subject: [PATCH] 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 --- src/rgw/driver/d4n/d4n_policy.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 } -- 2.47.3