From: Yehuda Sadeh Date: Fri, 6 Jul 2018 00:37:00 +0000 (-0700) Subject: rgw: sync module instance specifies whether user writes supported X-Git-Tag: v14.1.0~616^2~43 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e70234330662e32b10a24f371cf5de799f087354;p=ceph.git rgw: sync module instance specifies whether user writes supported Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 8c36c1bb368c..4e13091d3c60 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1652,6 +1652,9 @@ public: RGWDataSyncModule *get_data_handler() override { return &data_handler; } + bool supports_user_writes() override { + return true; + } }; int RGWDefaultSyncModule::create_instance(CephContext *cct, const JSONFormattable& config, RGWSyncModuleInstanceRef *instance) diff --git a/src/rgw/rgw_sync_module.h b/src/rgw/rgw_sync_module.h index 3540d2fb05cf..f626489ec548 100644 --- a/src/rgw/rgw_sync_module.h +++ b/src/rgw/rgw_sync_module.h @@ -42,6 +42,9 @@ public: virtual RGWRESTMgr *get_rest_filter(int dialect, RGWRESTMgr *orig) { return orig; } + virtual bool supports_user_writes() { + return false; + } }; typedef std::shared_ptr RGWSyncModuleInstanceRef; diff --git a/src/rgw/rgw_sync_module_es.h b/src/rgw/rgw_sync_module_es.h index 7dcda39cbf72..f7c46b54c9f9 100644 --- a/src/rgw/rgw_sync_module_es.h +++ b/src/rgw/rgw_sync_module_es.h @@ -23,6 +23,9 @@ public: RGWRESTMgr *get_rest_filter(int dialect, RGWRESTMgr *orig) override; RGWRESTConn *get_rest_conn(); std::string get_index_path(); + bool supports_user_writes() override { + return true; + } }; #endif diff --git a/src/rgw/rgw_sync_module_pubsub.h b/src/rgw/rgw_sync_module_pubsub.h index a7e91cfe28d8..b12bf9045838 100644 --- a/src/rgw/rgw_sync_module_pubsub.h +++ b/src/rgw/rgw_sync_module_pubsub.h @@ -21,6 +21,9 @@ public: RGWPSSyncModuleInstance(CephContext *cct, const JSONFormattable& config); RGWDataSyncModule *get_data_handler() override; RGWRESTMgr *get_rest_filter(int dialect, RGWRESTMgr *orig) override; + bool supports_user_writes() override { + return true; + } }; #endif diff --git a/src/rgw/services/svc_zone.cc b/src/rgw/services/svc_zone.cc index 2e1e67706808..614f11d0b9ad 100644 --- a/src/rgw/services/svc_zone.cc +++ b/src/rgw/services/svc_zone.cc @@ -151,6 +151,7 @@ int RGWSI_Zone::do_start() zone_short_id = current_period->get_map().get_zone_short_id(zone_params->get_id()); +#warning FIXME writeable_zone = (zone_public_config->tier_type.empty() || zone_public_config->tier_type == "rgw"); /* first build all zones index */