From 19f300fc5a7ce2e3e461160330af9b25138c82b0 Mon Sep 17 00:00:00 2001 From: Baasit Date: Mon, 9 Oct 2023 12:43:17 +0100 Subject: [PATCH] feat: renaming kv directory to metadata (#2549) * fix: renamed kv directory to metadata directory * fix: changed function name * fix: changed function name --- src/cmd/src/standalone.rs | 15 +++++++++------ src/common/config/src/lib.rs | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/cmd/src/standalone.rs b/src/cmd/src/standalone.rs index 13bada3d6a71..2f0a6e07cb73 100644 --- a/src/cmd/src/standalone.rs +++ b/src/cmd/src/standalone.rs @@ -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; @@ -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()) diff --git a/src/common/config/src/lib.rs b/src/common/config/src/lib.rs index 4daa3f0bc652..fd232735873e 100644 --- a/src/common/config/src/lib.rs +++ b/src/common/config/src/lib.rs @@ -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)]