From a09b70cdc20f43a594bab01200bf5c458e7fd7a3 Mon Sep 17 00:00:00 2001 From: WenyXu Date: Thu, 24 Aug 2023 07:14:01 +0000 Subject: [PATCH] refactor: set default metasrv procedure retry times to 12 --- config/metasrv.example.toml | 2 +- src/meta-srv/src/metasrv.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/metasrv.example.toml b/config/metasrv.example.toml index 647d98c0ec3e..b1facf851871 100644 --- a/config/metasrv.example.toml +++ b/config/metasrv.example.toml @@ -26,7 +26,7 @@ enable_telemetry = true # Procedure storage options. [procedure] # Procedure max retry time. -max_retry_times = 3 +max_retry_times = 12 # Initial retry delay of procedures, increases exponentially retry_delay = "500ms" diff --git a/src/meta-srv/src/metasrv.rs b/src/meta-srv/src/metasrv.rs index 2afc782dac80..ca3d67dbc457 100644 --- a/src/meta-srv/src/metasrv.rs +++ b/src/meta-srv/src/metasrv.rs @@ -16,6 +16,7 @@ pub mod builder; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; +use std::time::Duration; use api::v1::meta::Peer; use common_catalog::consts::{DEFAULT_CATALOG_NAME, DEFAULT_SCHEMA_NAME}; @@ -79,7 +80,10 @@ impl Default for MetaSrvOptions { dir: format!("{METASRV_HOME}/logs"), ..Default::default() }, - procedure: ProcedureConfig::default(), + procedure: ProcedureConfig { + max_retry_times: 12, + retry_delay: Duration::from_millis(500), + }, datanode: DatanodeOptions::default(), enable_telemetry: true, data_home: METASRV_HOME.to_string(),