Skip to content

Commit

Permalink
feat: renaming kv directory to metadata (#2549)
Browse files Browse the repository at this point in the history
* fix: renamed kv directory to metadata directory

* fix: changed function name

* fix: changed function name
  • Loading branch information
Lilit0x authored Oct 9, 2023
1 parent cc83764 commit 19f300f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions src/cmd/src/standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use catalog::kvbackend::KvBackendCatalogManager;
use catalog::CatalogManagerRef;
use clap::Parser;
use common_base::Plugins;
use common_config::{kv_store_dir, KvStoreConfig, WalConfig};
use common_config::{metadata_store_dir, KvStoreConfig, WalConfig};
use common_meta::cache_invalidator::DummyKvCacheInvalidator;
use common_meta::kv_backend::KvBackendRef;
use common_procedure::ProcedureManagerRef;
Expand Down Expand Up @@ -310,11 +310,14 @@ impl StartCommand {
fe_opts, dn_opts
);

let kv_dir = kv_store_dir(&opts.data_home);
let (kv_store, procedure_manager) =
FeInstance::try_build_standalone_components(kv_dir, opts.kv_store, opts.procedure)
.await
.context(StartFrontendSnafu)?;
let metadata_dir = metadata_store_dir(&opts.data_home);
let (kv_store, procedure_manager) = FeInstance::try_build_standalone_components(
metadata_dir,
opts.kv_store,
opts.procedure,
)
.await
.context(StartFrontendSnafu)?;

let datanode =
DatanodeBuilder::new(dn_opts.clone(), Some(kv_store.clone()), Default::default())
Expand Down
4 changes: 2 additions & 2 deletions src/common/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ impl Default for WalConfig {
}
}

pub fn kv_store_dir(store_dir: &str) -> String {
format!("{store_dir}/kv")
pub fn metadata_store_dir(store_dir: &str) -> String {
format!("{store_dir}/metadata")
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
Expand Down

0 comments on commit 19f300f

Please sign in to comment.