Skip to content

Commit

Permalink
fix: typo (#4931)
Browse files Browse the repository at this point in the history
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

Co-authored-by: Lei, HUANG <[email protected]>
  • Loading branch information
killme2008 and v0y4g3r authored Nov 4, 2024
1 parent be72d3b commit 7a4276c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/datanode/src/region_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/flow/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<usize, Error> {
let nodeid = self.opts.node_id;
let to_be_recovered: Vec<_> = if let Some(nodeid) = nodeid {
Expand Down
4 changes: 2 additions & 2 deletions src/mito2/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
};
Expand Down
14 changes: 7 additions & 7 deletions src/mito2/src/read/scan_region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pub(crate) struct ScanRegion {
/// Cache.
cache_manager: Option<CacheManagerRef>,
/// Parallelism to scan.
parallelism: ScanParallism,
parallelism: ScanParallelism,
/// Whether to ignore inverted index.
ignore_inverted_index: bool,
/// Whether to ignore fulltext index.
Expand All @@ -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,
Expand All @@ -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
}
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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<InvertedIndexApplierRef>,
fulltext_index_applier: Option<FulltextIndexApplierRef>,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion src/servers/src/mysql/federated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit 7a4276c

Please sign in to comment.