Skip to content

Commit

Permalink
refactor!: rename initialize_region_in_background to init_regions_in_…
Browse files Browse the repository at this point in the history
…background (#3216)

refactor!: change initialize_region_in_background to init_regions_in_background
  • Loading branch information
WenyXu authored Jan 23, 2024
1 parent 007b63d commit 19413eb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/datanode.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/datanode/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ pub struct DatanodeOptions {
pub mode: Mode,
pub node_id: Option<u64>,
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<String>,
pub rpc_runtime_size: usize,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/datanode/src/datanode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tests-integration/tests/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 19413eb

Please sign in to comment.