derr << "ERROR: failed to register to service map: " << cpp_strerror(-r) << dendl;
/* ignore error */
}
- s3vector::init(dpp, env.driver);
-
#ifdef WITH_RADOSGW_RADOS
if (env.driver->get_name() == "rados") {
// add a watcher to respond to realm configuration changes
}
if (dedup_background) {
rgw_pauser->add_pauser(dedup_background.get());
+ }
+ if (s3vector_pauser) {
+ rgw_pauser->add_pauser(s3vector_pauser.get());
}
reloader = std::make_unique<RGWRealmReloader>(
env, *implicit_tenant_context, service_map_meta, rgw_pauser.get(), context_pool_holder.get());
dpp->get_cct(), Keyring::get_best());
}
+void rgw::AppMain::init_s3vector()
+{
+ s3vector::init(dpp, env.driver);
+ s3vector_pauser = std::make_unique<S3VectorPauser>(dpp);
+}
+
void rgw::AppMain::shutdown(std::function<void(void)> finalize_async_signals)
{
// stop the realm reloader
}
s3vector::shutdown();
+ s3vector_pauser.reset();
env.driver->shutdown();
// Do this before closing storage so requests don't try to call into
}
main.init_lua();
+ main.init_s3vector();
#ifdef WITH_RADOSGW_RADOS
main.init_dedup();
#endif
main.init_tracepoints();
main.init_lua();
main.init_kms_cache();
+ main.init_s3vector();
#ifdef WITH_RADOSGW_RADOS
main.init_dedup();
#endif
#ifdef WITH_RADOSGW_RADOS
#include "rgw_dedup.h"
#endif
+#include "rgw_s3vector_background.h"
#include "rgw_dmclock_scheduler_ctx.h"
#include "rgw_ratelimit.h"
};
+class S3VectorPauser : public RGWRealmReloader::Pauser {
+ const DoutPrefixProvider* dpp;
+public:
+ S3VectorPauser(const DoutPrefixProvider* dpp) : dpp(dpp) {}
+ void pause() override {
+ rgw::s3vector::pause();
+ }
+ void resume(rgw::sal::Driver* driver) override {
+ rgw::s3vector::resume(dpp, driver);
+ }
+};
+
namespace rgw {
namespace lua { class Background; }
std::unique_ptr<rgw::LDAPHelper> ldh;
RGWREST rest;
std::unique_ptr<rgw::lua::Background> lua_background;
+ std::unique_ptr<S3VectorPauser> s3vector_pauser;
#ifdef WITH_RADOSGW_RADOS
std::unique_ptr<rgw::dedup::Background> dedup_background;
#endif
void init_tracepoints();
void init_lua();
void init_kms_cache();
+ void init_s3vector();
#ifdef WITH_RADOSGW_RADOS
void init_dedup();
#endif
s_manager.reset();
}
+void pause() {
+ shutdown();
+}
+
+void resume(const DoutPrefixProvider* dpp, rgw::sal::Driver* driver) {
+ init(dpp, driver);
+}
+
bool notify_index_update(const DoutPrefixProvider* dpp, const std::string& bucket_name, const std::string& index_name) {
if (!s_manager) {
ldpp_dout(dpp, 1) << "ERROR: failed to notify s3vectors manager about table update: manager is not initialized" << dendl;
namespace rgw::s3vector {
bool init(const DoutPrefixProvider* dpp, rgw::sal::Driver* driver);
void shutdown();
+ void pause();
+ void resume(const DoutPrefixProvider* dpp, rgw::sal::Driver* driver);
// update whenever new vectors are added to an index
bool notify_index_update(const DoutPrefixProvider* dpp, const std::string& bucket_name, const std::string& index_name);
}