diff --git a/src/cmd/src/options.rs b/src/cmd/src/options.rs index 9bd6fc07e46d..b48b57c237f9 100644 --- a/src/cmd/src/options.rs +++ b/src/cmd/src/options.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use common_config::KvStoreConfig; +use common_config::KvBackendConfig; use common_telemetry::logging::LoggingOptions; use config::{Config, Environment, File, FileFormat}; use datanode::config::{DatanodeOptions, ProcedureConfig}; @@ -30,7 +30,7 @@ pub const ENV_LIST_SEP: &str = ","; pub struct MixOptions { pub data_home: String, pub procedure: ProcedureConfig, - pub metadata_store: KvStoreConfig, + pub metadata_store: KvBackendConfig, pub frontend: FrontendOptions, pub datanode: DatanodeOptions, pub logging: LoggingOptions, diff --git a/src/cmd/src/standalone.rs b/src/cmd/src/standalone.rs index a08a838c8075..7d23702ee328 100644 --- a/src/cmd/src/standalone.rs +++ b/src/cmd/src/standalone.rs @@ -19,7 +19,7 @@ use catalog::kvbackend::KvBackendCatalogManager; use catalog::CatalogManagerRef; use clap::Parser; use common_base::Plugins; -use common_config::{metadata_store_dir, KvStoreConfig, WalConfig}; +use common_config::{metadata_store_dir, KvBackendConfig, WalConfig}; use common_meta::cache_invalidator::DummyKvCacheInvalidator; use common_meta::kv_backend::KvBackendRef; use common_procedure::ProcedureManagerRef; @@ -97,7 +97,7 @@ pub struct StandaloneOptions { pub prom_store: PromStoreOptions, pub wal: WalConfig, pub storage: StorageConfig, - pub metadata_store: KvStoreConfig, + pub metadata_store: KvBackendConfig, pub procedure: ProcedureConfig, pub logging: LoggingOptions, pub user_provider: Option, @@ -119,7 +119,7 @@ impl Default for StandaloneOptions { prom_store: PromStoreOptions::default(), wal: WalConfig::default(), storage: StorageConfig::default(), - metadata_store: KvStoreConfig::default(), + metadata_store: KvBackendConfig::default(), procedure: ProcedureConfig::default(), logging: LoggingOptions::default(), user_provider: None, diff --git a/src/common/config/src/lib.rs b/src/common/config/src/lib.rs index 34418c147cf1..4cf4a0804eb8 100644 --- a/src/common/config/src/lib.rs +++ b/src/common/config/src/lib.rs @@ -54,14 +54,14 @@ pub fn metadata_store_dir(store_dir: &str) -> String { #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] #[serde(default)] -pub struct KvStoreConfig { +pub struct KvBackendConfig { // Kv file size in bytes pub file_size: ReadableSize, // Kv purge threshold in bytes pub purge_threshold: ReadableSize, } -impl Default for KvStoreConfig { +impl Default for KvBackendConfig { fn default() -> Self { Self { // log file size 256MB diff --git a/src/frontend/src/instance.rs b/src/frontend/src/instance.rs index db8e0c91ea4a..2e5ef085f806 100644 --- a/src/frontend/src/instance.rs +++ b/src/frontend/src/instance.rs @@ -30,7 +30,7 @@ use catalog::kvbackend::{CachedMetaKvBackend, KvBackendCatalogManager}; use catalog::CatalogManagerRef; use client::client_manager::DatanodeClients; use common_base::Plugins; -use common_config::KvStoreConfig; +use common_config::KvBackendConfig; use common_error::ext::BoxedError; use common_grpc::channel_manager::{ChannelConfig, ChannelManager}; use common_meta::cache_invalidator::DummyCacheInvalidator; @@ -257,7 +257,7 @@ impl Instance { pub async fn try_build_standalone_components( dir: String, - kv_backend_config: KvStoreConfig, + kv_backend_config: KvBackendConfig, procedure_config: ProcedureConfig, ) -> Result<(KvBackendRef, ProcedureManagerRef)> { let kv_backend = Arc::new( diff --git a/tests-integration/src/standalone.rs b/tests-integration/src/standalone.rs index c849b66defb0..c8c66cbd3cc3 100644 --- a/tests-integration/src/standalone.rs +++ b/tests-integration/src/standalone.rs @@ -16,7 +16,7 @@ use std::sync::Arc; use catalog::kvbackend::KvBackendCatalogManager; use common_base::Plugins; -use common_config::KvStoreConfig; +use common_config::KvBackendConfig; use common_meta::cache_invalidator::DummyKvCacheInvalidator; use common_procedure::options::ProcedureConfig; use datanode::config::DatanodeOptions; @@ -68,7 +68,7 @@ impl GreptimeDbStandaloneBuilder { let (kv_backend, procedure_manager) = Instance::try_build_standalone_components( format!("{}/kv", &opts.storage.data_home), - KvStoreConfig::default(), + KvBackendConfig::default(), ProcedureConfig::default(), ) .await