Normal shutdown was likely to be delayed a substantial fraction
of rgw_nfs_namespace_expire_secs due to an ill-advised use of
this_thread::sleep_for.
Fixes: https://tracker.ceph.com/issues/47710
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
if (cur_gen != gen)
goto restart; /* invalidated */
}
+ cv.wait_for(uniq, std::chrono::seconds(delay_s));
uniq.unlock();
- std::this_thread::sleep_for(std::chrono::seconds(delay_s));
}
}
class RGWLibProcess : public RGWProcess {
RGWAccessKey access_key;
std::mutex mtx;
+ std::condition_variable cv;
int gen;
bool shutdown;
for (const auto& fs: mounted_fs) {
fs.second->stop();
}
+ cv.notify_all();
}
void register_fs(RGWLibFS* fs) {