This is an automated email from the ASF dual-hosted git repository.

jiacai2050 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-horaedb.git


The following commit(s) were added to refs/heads/main by this push:
     new 6d391152 refactor: allow disable wal in standalone mode (#1526)
6d391152 is described below

commit 6d391152d0c0faef6a7a36c0a16b9fdb7e984b64
Author: CooooolFrog <[email protected]>
AuthorDate: Mon May 6 17:15:08 2024 +0800

    refactor: allow disable wal in standalone mode (#1526)
    
    ## Rationale
    Currently, disable wal in standalone mode will directly cause panic.
    This behavior is incorrect. Sometimes we also need to disable wal in
    standalone mode.
    
    ## Detailed Changes
    * Disable wal in stand-alone mode will not panic and print a log to warn
    the user.
    
    ## Test Plan
    Pass CI.
---
 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 7a2b32f1..1cc0e2ab 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")
     }
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to