Skip to content

Commit

Permalink
rgw: Add option to configure backend store
Browse files Browse the repository at this point in the history
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
  • Loading branch information
soumyakoduri committed Sep 7, 2021
1 parent 81d52a2 commit 273fb58
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/common/options/rgw.yaml.in
Expand Up @@ -3229,3 +3229,11 @@ options:
- rgw
flags:
- startup
- 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
11 changes: 10 additions & 1 deletion src/rgw/rgw_main.cc
Expand Up @@ -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,
Expand Down

0 comments on commit 273fb58

Please sign in to comment.