From 1905b58b0513a86e00e68aa33a99bdba80effac7 Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" Date: Sat, 2 Nov 2024 22:08:33 -0700 Subject: [PATCH] fix/database-base-ttl: Fix typos in comments and function names across multiple modules - Correct spelling of 'parallelism' in region_server, engine, and scan_region modules - Amend typo in TODO comment from 'persisent' to 'persistent' in server module - Update incorrect test query from 'versiona' to 'version' in federated module tests --- src/datanode/src/region_server.rs | 2 +- src/flow/src/server.rs | 2 +- src/mito2/src/engine.rs | 4 ++-- src/mito2/src/read/scan_region.rs | 14 +++++++------- src/servers/src/mysql/federated.rs | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/datanode/src/region_server.rs b/src/datanode/src/region_server.rs index b6e1eb040402..43baf32ec323 100644 --- a/src/datanode/src/region_server.rs +++ b/src/datanode/src/region_server.rs @@ -1355,7 +1355,7 @@ mod tests { } #[tokio::test] - async fn test_region_server_parallism() { + async fn test_region_server_parallelism() { let p = RegionServerParallelism::from_opts(2, Duration::from_millis(1)).unwrap(); let first_query = p.acquire().await; assert!(first_query.is_ok()); diff --git a/src/flow/src/server.rs b/src/flow/src/server.rs index 4381dd06a03b..ff80bb64fe6f 100644 --- a/src/flow/src/server.rs +++ b/src/flow/src/server.rs @@ -303,7 +303,7 @@ impl FlownodeBuilder { /// /// or recover all existing flow tasks if in standalone mode(nodeid is None) /// - /// TODO(discord9): persisent flow tasks with internal state + /// TODO(discord9): persistent flow tasks with internal state async fn recover_flows(&self, manager: &FlowWorkerManagerRef) -> Result { let nodeid = self.opts.node_id; let to_be_recovered: Vec<_> = if let Some(nodeid) = nodeid { diff --git a/src/mito2/src/engine.rs b/src/mito2/src/engine.rs index 8e628772703c..32b69f620517 100644 --- a/src/mito2/src/engine.rs +++ b/src/mito2/src/engine.rs @@ -89,7 +89,7 @@ use crate::error::{ }; use crate::manifest::action::RegionEdit; use crate::metrics::HANDLE_REQUEST_ELAPSED; -use crate::read::scan_region::{ScanParallism, ScanRegion, Scanner}; +use crate::read::scan_region::{ScanParallelism, ScanRegion, Scanner}; use crate::request::{RegionEditRequest, WorkerRequest}; use crate::wal::entry_distributor::{ build_wal_entry_distributor_and_receivers, DEFAULT_ENTRY_RECEIVER_BUFFER_SIZE, @@ -417,7 +417,7 @@ impl EngineInner { let version = region.version(); // Get cache. let cache_manager = self.workers.cache_manager(); - let scan_parallelism = ScanParallism { + let scan_parallelism = ScanParallelism { parallelism: self.config.scan_parallelism, channel_size: self.config.parallel_scan_channel_size, }; diff --git a/src/mito2/src/read/scan_region.rs b/src/mito2/src/read/scan_region.rs index 6e2a0344338b..1a7fb29b2e56 100644 --- a/src/mito2/src/read/scan_region.rs +++ b/src/mito2/src/read/scan_region.rs @@ -169,7 +169,7 @@ pub(crate) struct ScanRegion { /// Cache. cache_manager: Option, /// Parallelism to scan. - parallelism: ScanParallism, + parallelism: ScanParallelism, /// Whether to ignore inverted index. ignore_inverted_index: bool, /// Whether to ignore fulltext index. @@ -191,7 +191,7 @@ impl ScanRegion { access_layer, request, cache_manager, - parallelism: ScanParallism::default(), + parallelism: ScanParallelism::default(), ignore_inverted_index: false, ignore_fulltext_index: false, start_time: None, @@ -200,7 +200,7 @@ impl ScanRegion { /// Sets parallelism. #[must_use] - pub(crate) fn with_parallelism(mut self, parallelism: ScanParallism) -> Self { + pub(crate) fn with_parallelism(mut self, parallelism: ScanParallelism) -> Self { self.parallelism = parallelism; self } @@ -447,7 +447,7 @@ impl ScanRegion { /// Config for parallel scan. #[derive(Debug, Clone, Copy, Default)] -pub(crate) struct ScanParallism { +pub(crate) struct ScanParallelism { /// Number of tasks expect to spawn to read data. pub(crate) parallelism: usize, /// Channel size to send batches. Only takes effect when the parallelism > 1. @@ -484,7 +484,7 @@ pub(crate) struct ScanInput { /// Ignores file not found error. ignore_file_not_found: bool, /// Parallelism to scan data. - pub(crate) parallelism: ScanParallism, + pub(crate) parallelism: ScanParallelism, /// Index appliers. inverted_index_applier: Option, fulltext_index_applier: Option, @@ -513,7 +513,7 @@ impl ScanInput { files: Vec::new(), cache_manager: None, ignore_file_not_found: false, - parallelism: ScanParallism::default(), + parallelism: ScanParallelism::default(), inverted_index_applier: None, fulltext_index_applier: None, query_start: None, @@ -568,7 +568,7 @@ impl ScanInput { /// Sets scan parallelism. #[must_use] - pub(crate) fn with_parallelism(mut self, parallelism: ScanParallism) -> Self { + pub(crate) fn with_parallelism(mut self, parallelism: ScanParallelism) -> Self { self.parallelism = parallelism; self } diff --git a/src/servers/src/mysql/federated.rs b/src/servers/src/mysql/federated.rs index 71733dcc1288..ae4ac70ed6e5 100644 --- a/src/servers/src/mysql/federated.rs +++ b/src/servers/src/mysql/federated.rs @@ -302,7 +302,7 @@ mod test { let result = check(query, QueryContext::arc(), session.clone()); assert!(result.is_none()); - let query = "select versiona"; + let query = "select version"; let output = check(query, QueryContext::arc(), session.clone()); assert!(output.is_none());