Skip to content

Commit

Permalink
Fixing spelling mistakes. (#2927)
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton authored Mar 3, 2023
1 parent 81af21f commit b17062b
Show file tree
Hide file tree
Showing 81 changed files with 148 additions and 142 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ You will be notified by email from the CI system if any issues are discovered, b
* `make -k test-all docker-compose-down` - the same as above, but tears down the Docker services after running all the tests.
* `make fmt` - runs formatter, this command requires the nightly toolchain to be installed by running `rustup toolchain install nightly`.
* `make fix` - runs formatter and clippy checks.
* `make typos` - runs the spellcheck tool over the codebase. (Install by running `cargo install typos`)
* `make build-docs` - builds docs.
* `make docker-compose-up` - starts Docker services.
* `make docker-compose-down` - stops Docker services.
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ fmt:
fix:
@$(MAKE) -C $(QUICKWIT_SRC) fix

typos:
typos

# Usage:
# `make test-all` starts the Docker services and runs all the tests.
# `make -k test-all docker-compose-down`, tears down the Docker services after running all the tests.
Expand Down
2 changes: 2 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[files]
extend-exclude = ["**/*.json"]
2 changes: 1 addition & 1 deletion build/cross-images/aarch64-unknown-linux-gnu.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG PBC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v21.5

#TODO:
# We can switch to static linking (remove `libsasl2-dev:arm64`) using
# `rdkafka/gssapi-vendored` feature when there is a release incuding:
# `rdkafka/gssapi-vendored` feature when there is a release including:
# https://github.com/MaterializeInc/rust-sasl/pull/48

RUN dpkg --add-architecture arm64 && \
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ a few faulty documents.
Quickwit allows you to configure how document are routed with a simple DSL. Here are some sample expression with a short description of their result:

- `tenant_id`: create one partition per tenant\_id
- `tenant_id,app_id`: create one partiton per unique combination of tenant\_id and app\_id
- `tenant_id,app_id`: create one partition per unique combination of tenant\_id and app\_id
- `tenant_id,hash_mod(app_id, 8)`: for each tenant, create up to 8 partitions containing each data related to some applications
- `hash_mod((tenant_id,app_id), 50)`: create 50 partition in total, containing some combination of tenant and apps.

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/schemaless.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Quickwit lets you place the cursor on how strict you would like your schema to b

:::note

To execute the CLI commands thoughout this guide, [install](/docs/get-started/installation.md) Quickwit and start a server in a terminal with the following command:
To execute the CLI commands throughout this guide, [install](/docs/get-started/installation.md) Quickwit and start a server in a terminal with the following command:

```bash
./quickwit run
Expand Down
2 changes: 1 addition & 1 deletion docs/internals/backward-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Stored in metastore only:
- FileBackedIndex
- SplitMetadata.

Quickwit currently manages backward compatibiltiy of all of these resources but QuickwitConfig.
Quickwit currently manages backward compatibility of all of these resources but QuickwitConfig.
This document describes how to handle a change, and how to make test such a change,
and spot eventual regression.

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/storage-uri.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ See our [Scaleway Setup Guide](../guides/storage-setup/scaleway-setup.md) for th

### Garage

[Garage](https://garagehq.deuxfleurs.fr/) is an Open-Souce lightweight and efficient object storage.
[Garage](https://garagehq.deuxfleurs.fr/) is an Open-Source lightweight and efficient object storage.

To use it with Quickwit, you will need to setup the region, as mentioned in [Garage documentation](https://garagehq.deuxfleurs.fr/documentation/connect/), it's often set just to `garage`.

Expand Down
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# This is just a little script that can be downloaded from the internet to
# install Quickwit.
# It just does platform detection, fetches the lastest appropriate release version from github
# It just does platform detection, fetches the latest appropriate release version from github
# and execute the appropriate commands to download the binary.
#
# Heavily inspired by the Vector & Meilisearch installation scripts
Expand Down Expand Up @@ -199,7 +199,7 @@ get_latest_version() {
latest=""
current_tag=""
for release_info in $releases; do
if [ $i -eq 0 ]; then # Cheking tag_name
if [ $i -eq 0 ]; then # Checking tag_name
if echo "$release_info" | grep -q "$GREP_SEMVER_REGEXP"; then # If it's not an alpha or beta release
current_tag=$release_info
else
Expand Down
4 changes: 2 additions & 2 deletions quickwit/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ignore = [
[licenses]
# The lint level for crates which do not have a detectable license
unlicensed = "deny"
# List of explictly allowed licenses
# List of explicitly allowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
allow = [
Expand All @@ -85,7 +85,7 @@ allow = [
"Zlib",
"zlib-acknowledgement",
]
# List of explictly disallowed licenses
# List of explicitly disallowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
deny = [
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-actors/src/actor_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ impl<A: Actor> ActorContext<A> {
/// more indicated.
///
/// Droppping the receiver channel will not cancel the
/// processing of the messsage. It is a very common usage.
/// processing of the message. It is a very common usage.
/// In fact most actors are expected to send message in a
/// fire-and-forget fashion.
///
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-actors/src/channel_with_priority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ mod tests {
}

#[tokio::test]
async fn test_try_recv_prority_corner_case() -> anyhow::Result<()> {
async fn test_try_recv_priority_corner_case() -> anyhow::Result<()> {
let (sender, receiver) = super::channel::<usize>(QueueCapacity::Unbounded);
tokio::task::spawn(async move {
tokio::time::sleep(Duration::from_millis(10)).await;
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-actors/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl<A: Actor> Handler<Command> for A {

/// Asks the actor to update its ObservableState.
///
/// The observation is then available using the `ActorHander::last_observation()`
/// The observation is then available using the `ActorHandler::last_observation()`
/// method.
#[derive(Debug)]
pub(crate) struct Observe;
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-actors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ pub const HEARTBEAT: Duration = if cfg!(any(test, feature = "testsuite")) {
/// Once this time is elapsed, we just return the last observation.
const OBSERVE_TIMEOUT: Duration = Duration::from_secs(3);

/// Error that occured while calling `ActorContext::ask(..)` or `Universe::ask`
/// Error that occurred while calling `ActorContext::ask(..)` or `Universe::ask`
#[derive(Error, Debug)]
pub enum AskError<E: fmt::Debug> {
#[error("Message could not be delivered")]
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-actors/src/mailbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ mod tests {
.await
.unwrap();
// That second message will present some backpressure, since the capacity is 0 and
// the first message willl take 1000 micros to be processed.
// the first message will take 1000 micros to be processed.
mailbox
.send_message_with_backpressure_counter(
Duration::default(),
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-actors/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ impl ActorJoinHandle {
})
}

/// Joins the actor and returns its exit status on the frist invocation.
/// Joins the actor and returns its exit status on the first invocation.
/// Returns None afterwards.
pub(crate) async fn join(&self) -> ActorExitStatus {
self.holder.clone().await
Expand Down
10 changes: 5 additions & 5 deletions quickwit/quickwit-actors/src/universe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ mod tests {
async fn test_schedule_for_actor() {
let universe = Universe::with_accelerated_time();
let actor_with_schedule = CountingMinutesActor::default();
let (_maibox, handler) = universe.spawn_builder().spawn(actor_with_schedule);
let (_mailbox, handler) = universe.spawn_builder().spawn(actor_with_schedule);
let count_after_initialization = handler.process_pending_and_observe().await.state;
assert_eq!(count_after_initialization, 1);
universe.sleep(Duration::from_secs(200)).await;
Expand All @@ -229,7 +229,7 @@ mod tests {
async fn test_actor_quit_after_universe_quit() {
let universe = Universe::with_accelerated_time();
let actor_with_schedule = CountingMinutesActor::default();
let (_maibox, handler) = universe.spawn_builder().spawn(actor_with_schedule);
let (_mailbox, handler) = universe.spawn_builder().spawn(actor_with_schedule);
universe.sleep(Duration::from_secs(200)).await;
let res = universe.quit().await;
assert_eq!(res.len(), 1);
Expand All @@ -241,7 +241,7 @@ mod tests {
async fn test_universe_join_after_actor_quit() {
let universe = Universe::default();
let actor_with_schedule = CountingMinutesActor::default();
let (_maibox, handler) = universe.spawn_builder().spawn(actor_with_schedule);
let (_mailbox, handler) = universe.spawn_builder().spawn(actor_with_schedule);
assert!(matches!(handler.quit().await, (ActorExitStatus::Quit, 1)));
assert!(!universe
.quit()
Expand All @@ -255,8 +255,8 @@ mod tests {
let universe = Universe::default();
let panicking_actor = ExitPanickingActor::default();
let actor_with_schedule = CountingMinutesActor::default();
let (_maibox, _handler) = universe.spawn_builder().spawn(panicking_actor);
let (_maibox, _handler) = universe.spawn_builder().spawn(actor_with_schedule);
let (_mailbox, _handler) = universe.spawn_builder().spawn(panicking_actor);
let (_mailbox, _handler) = universe.spawn_builder().spawn(actor_with_schedule);
assert!(universe
.quit()
.await
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-aws/src/region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub fn region_from_str(region_str: &str) -> anyhow::Result<Region> {
return Ok(region);
}
// Maybe this is a custom endpoint (for MinIO for instance).
// We require custom endpoints to explicitely state the http/https protocol`.
// We require custom endpoints to explicitly state the http/https protocol`.
if !region_str.starts_with("http") {
anyhow::bail!(
"Invalid AWS region. Quickwit expects an AWS region code like `us-east-1` or a \
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-cli/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ pub async fn start_statistics_reporting_loop(

loop {
// TODO fixme. The way we wait today is a bit lame: if the indexing pipeline exits, we will
// stil wait up to an entire heartbeat... Ideally we should select between two
// still wait up to an entire heartbeat... Ideally we should select between two
// futures.
report_interval.tick().await;
// Try to receive with a timeout of 1 second.
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async fn load_quickwit_config(config_uri: &Uri) -> anyhow::Result<QuickwitConfig
}

/// Runs connectivity checks for a given `metastore_uri` and `index_id`.
/// Optionaly, it takes a `SourceConfig` that will be checked instead
/// Optionally, it takes a `SourceConfig` that will be checked instead
/// of the index's sources.
pub async fn run_index_checklist(
metastore_uri: &Uri,
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-cli/src/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ pub async fn start_statistics_reporting_loop(

loop {
// TODO fixme. The way we wait today is a bit lame: if the indexing pipeline exits, we will
// stil wait up to an entire heartbeat... Ideally we should select between two
// still wait up to an entire heartbeat... Ideally we should select between two
// futures.
report_interval.tick().await;
// Try to receive with a timeout of 1 second.
Expand Down
4 changes: 2 additions & 2 deletions quickwit/quickwit-cli/tests/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub async fn wait_port_ready(port: u16) -> anyhow::Result<()> {
}
}

/// A struct to hold few info about the test environement.
/// A struct to hold few info about the test environment.
pub struct TestEnv {
/// The temporary directory of the test.
_tempdir: TempDir,
Expand Down Expand Up @@ -182,7 +182,7 @@ pub enum TestStorageType {
LocalFileSystem,
}

/// Creates all necessary artifacts in a test environement.
/// Creates all necessary artifacts in a test environment.
pub fn create_test_env(index_id: String, storage_type: TestStorageType) -> anyhow::Result<TestEnv> {
let tempdir = tempdir()?;
let data_dir_path = tempdir.path().join("data");
Expand Down
6 changes: 3 additions & 3 deletions quickwit/quickwit-cluster/src/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ impl Cluster {
info!(self_addr = ?self.gossip_listen_addr, "Shutting down chitchat.");
let result = self.chitchat_handle.shutdown().await;
if let Err(error) = result {
error!(self_addr = ?self.gossip_listen_addr, error = ?error, "Error while shuting down chitchat.");
error!(self_addr = ?self.gossip_listen_addr, error = ?error, "Error while shutting down chitchat.");
}

self.stop.store(true, Ordering::Relaxed);
Expand All @@ -304,7 +304,7 @@ impl Cluster {
Ok(())
}

/// Set self readyness value.
/// Set self readiness value.
pub async fn set_self_node_ready(&self, ready: bool) {
let health_value = if ready {
HEALTH_VALUE_READY
Expand Down Expand Up @@ -499,7 +499,7 @@ mod tests {
use super::*;

#[tokio::test]
async fn test_cluster_single_node_readyness() -> anyhow::Result<()> {
async fn test_cluster_single_node_readiness() -> anyhow::Result<()> {
let transport = ChannelTransport::default();
let cluster = create_cluster_for_test(Vec::new(), &[], &transport, false).await?;
let members: Vec<SocketAddr> = cluster
Expand Down
2 changes: 1 addition & 1 deletion quickwit/quickwit-common/src/checklist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub fn print_checklist(check_list_results: &[(&str, anyhow::Result<()>)]) {

/// Run a checklist and print out its successes and failures on stdout.
///
/// If an error is encountered, the proccess will exit with exit code 1.
/// If an error is encountered, the process will exit with exit code 1.
pub fn run_checklist(checks: Vec<(&str, anyhow::Result<()>)>) -> Result<(), ChecklistError> {
print_checklist(&checks);
if !checks
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 0.4
searcher:
fast_field_cache_capacity: 10G
# Typo here. It is supposed to be searchs.
max_num_concurrent_split_searchs: 150
# Typo here. It is supposed to be searches.
max_num_concurrent_split_searchs_with_typo: 150
2 changes: 1 addition & 1 deletion quickwit/quickwit-config/src/quickwit_config/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ mod tests {
.await
.unwrap_err();
assert!(format!("{parsing_error:?}")
.contains("unknown field `max_num_concurrent_split_searchs`"));
.contains("unknown field `max_num_concurrent_split_searches_with_typo`"));
}

#[tokio::test]
Expand Down
4 changes: 2 additions & 2 deletions quickwit/quickwit-config/src/source_config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub struct SourceConfig {

/// Maximum number of indexing pipelines spawned for the source on a given indexer.
/// The maximum is reached only if there is enough `desired_num_pipelines` to run.
/// The value is only used by sources that Quickwit knows how to distribute accross
/// The value is only used by sources that Quickwit knows how to distribute across
/// pipelines/nodes, that is for Kafka sources only.
/// Example:
/// - `max_num_pipelines_per_indexer=2`
Expand All @@ -59,7 +59,7 @@ pub struct SourceConfig {
pub max_num_pipelines_per_indexer: usize,
/// Number of desired indexing pipelines to run on a cluster for the source.
/// This number could not be reach if there is not enough indexers.
/// The value is only used by sources that Quickwit knows how to distribute accross
/// The value is only used by sources that Quickwit knows how to distribute across
/// pipelines/nodes, that is for Kafka sources only.
/// Example:
/// - `max_num_pipelines_per_indexer=1`
Expand Down
6 changes: 3 additions & 3 deletions quickwit/quickwit-control-plane/src/indexing_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ impl PhysicalIndexingPlan {
/// Builds a [`PhysicalIndexingPlan`] by assigning each indexing tasks to a node ID.
/// The algorithm first sort indexing tasks by (index_id, source_id).
/// Then for each indexing tasks, it performs the following steps:
/// 1. Sort node by rendez-vous hashing to make the assigment stable (it makes it
/// 1. Sort node by rendez-vous hashing to make the assignment stable (it makes it
/// deterministic too). This is not bullet proof as the node score has an impact
/// on the assigment too.
/// on the assignment too.
/// 2. Select node candidates that can run the task, see [`select_node_candidates`]
/// function.
/// 3. For each node, compute a score for this task, the higher, the better, see
Expand Down Expand Up @@ -162,7 +162,7 @@ pub(crate) fn build_physical_indexing_plan(
.expect("SourceConfig should always be present.");
let candidates = select_node_candidates(&node_ids, &plan, source_config, &indexing_task);

// It's theoritically possible to have no candidate as all indexers can already
// It's theoretically possible to have no candidate as all indexers can already
// have more than `max_num_pipelines_per_indexer` assigned for a given source.
// But, when building the list of indexing tasks to run on the cluster in
// `build_indexing_plan`, we make sure to always respect the constraint
Expand Down
Loading

0 comments on commit b17062b

Please sign in to comment.