]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Add option to configure backend store
authorSoumya Koduri <skoduri@redhat.com>
Sun, 5 Sep 2021 07:21:18 +0000 (12:51 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Mon, 20 Sep 2021 13:14:47 +0000 (18:44 +0530)
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
src/common/options/rgw.yaml.in
src/rgw/rgw_main.cc

index 961d22b9e6d71f32729e8df3d3c50d9faad0ca0a..0cbf397783eeb434cd813603585ab350994209fe 100644 (file)
@@ -3220,6 +3220,17 @@ options:
   see_also:
   - rgw_thread_pool_size
   with_legacy: true
+- name: rgw_backend_store
+  type: str
+  level: advanced
+  desc: experimental Option to set backend store type
+  long_desc: defaults to rados. Other valid values are dbstore(experimental).
+  default: rados
+  services:
+  - rgw
+  enum_values:
+  - rados
+  - dbstore
 - name: rgw_luarocks_location
   type: str
   level: advanced
index c44b0cba61cab73ba9fa68e0988f0cc2f837d717..b905aa5c64df4a158744b980bac99380d32b5944 100644 (file)
@@ -346,9 +346,18 @@ int radosgw_Main(int argc, const char **argv)
   }
   lsubdout(cct, rgw, 1) << "D3N datacache enabled: " << rgw_d3n_datacache_enabled << dendl;
 
+  std::string rgw_store = (!rgw_d3n_datacache_enabled) ? "rados" : "d3n";
+
+  const auto& config_store = g_conf().get_val<std::string>("rgw_backend_store");
+#ifdef WITH_RADOSGW_DBSTORE
+  if (config_store == "dbstore") {
+    rgw_store = "dbstore";
+  }
+#endif
+
   rgw::sal::Store* store =
     StoreManager::get_storage(&dp, g_ceph_context,
-                                (!rgw_d3n_datacache_enabled) ? "rados" : "d3n",
+                                rgw_store,
                                 g_conf()->rgw_enable_gc_threads,
                                 g_conf()->rgw_enable_lc_threads,
                                 g_conf()->rgw_enable_quota_threads,