From 13430b440641a1aa76842b1598efedd9a8bc945f Mon Sep 17 00:00:00 2001 From: CooooolFrog Date: Mon, 6 May 2024 16:21:23 +0800 Subject: [PATCH] refactor: allow disable wal in standalone mode --- src/horaedb/src/setup.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/horaedb/src/setup.rs b/src/horaedb/src/setup.rs index 7a2b32f199..1cc0e2abc9 100644 --- a/src/horaedb/src/setup.rs +++ b/src/horaedb/src/setup.rs @@ -29,7 +29,7 @@ use cluster::{cluster_impl::ClusterImpl, config::ClusterConfig, shard_set::Shard use datafusion::execution::runtime_env::RuntimeConfig as DfRuntimeConfig; use df_operator::registry::{FunctionRegistry, FunctionRegistryImpl}; use interpreters::table_manipulator::{catalog_based, meta_based}; -use logger::{info, RuntimeLevel}; +use logger::{info, warn, RuntimeLevel}; use meta_client::{meta_impl, types::NodeMetaInfo}; use proxy::{ limiter::Limiter, @@ -122,10 +122,7 @@ fn build_engine_runtimes(config: &RuntimeConfig) -> EngineRuntimes { fn validate_config(config: &Config) { let is_data_wal_disabled = config.analytic.wal.disable_data; if is_data_wal_disabled { - let is_cluster = config.cluster_deployment.is_some(); - if !is_cluster { - panic!("Invalid config, we can only disable data wal in cluster deployments") - } + warn!("disable data wal may cause data loss, please check whether this configuration is correct") } }