From 19413eb345a06444475e90b342c3da7acc9f0434 Mon Sep 17 00:00:00 2001 From: Weny Xu Date: Tue, 23 Jan 2024 13:33:48 +0900 Subject: [PATCH] refactor!: rename initialize_region_in_background to init_regions_in_background (#3216) refactor!: change initialize_region_in_background to init_regions_in_background --- config/datanode.example.toml | 2 +- src/datanode/src/config.rs | 4 ++-- src/datanode/src/datanode.rs | 2 +- tests-integration/tests/http.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/datanode.example.toml b/config/datanode.example.toml index 73e50b21e30f..0c55993111dd 100644 --- a/config/datanode.example.toml +++ b/config/datanode.example.toml @@ -14,7 +14,7 @@ require_lease_before_startup = false # Initialize all regions in the background during the startup. # By default, it provides services after all regions have been initialized. -initialize_region_in_background = false +init_regions_in_background = false [heartbeat] # Interval for sending heartbeat messages to the Metasrv, 3 seconds by default. diff --git a/src/datanode/src/config.rs b/src/datanode/src/config.rs index 7b107d7a61a3..eee4004a1a67 100644 --- a/src/datanode/src/config.rs +++ b/src/datanode/src/config.rs @@ -226,7 +226,7 @@ pub struct DatanodeOptions { pub mode: Mode, pub node_id: Option, pub require_lease_before_startup: bool, - pub initialize_region_in_background: bool, + pub init_regions_in_background: bool, pub rpc_addr: String, pub rpc_hostname: Option, pub rpc_runtime_size: usize, @@ -252,7 +252,7 @@ impl Default for DatanodeOptions { mode: Mode::Standalone, node_id: None, require_lease_before_startup: false, - initialize_region_in_background: false, + init_regions_in_background: false, rpc_addr: "127.0.0.1:3001".to_string(), rpc_hostname: None, rpc_runtime_size: 8, diff --git a/src/datanode/src/datanode.rs b/src/datanode/src/datanode.rs index 42496b8458ce..7480b2cfa73f 100644 --- a/src/datanode/src/datanode.rs +++ b/src/datanode/src/datanode.rs @@ -232,7 +232,7 @@ impl DatanodeBuilder { let open_all_regions = open_all_regions(region_server.clone(), table_values, !controlled_by_metasrv); - if self.opts.initialize_region_in_background { + if self.opts.init_regions_in_background { // Opens regions in background. common_runtime::spawn_bg(async move { if let Err(err) = open_all_regions.await { diff --git a/tests-integration/tests/http.rs b/tests-integration/tests/http.rs index 397865dedfe9..da41dd300e82 100644 --- a/tests-integration/tests/http.rs +++ b/tests-integration/tests/http.rs @@ -728,7 +728,7 @@ write_interval = "30s" mode = "standalone" node_id = 0 require_lease_before_startup = true -initialize_region_in_background = false +init_regions_in_background = false rpc_addr = "127.0.0.1:3001" rpc_runtime_size = 8 rpc_max_recv_message_size = "512MiB"