Skip to content

Commit b17062b

Browse files
authored
Fixing spelling mistakes. (#2927)
1 parent 81af21f commit b17062b

File tree

81 files changed

+148
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+148
-142
lines changed

CONTRIBUTING.md

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ You will be notified by email from the CI system if any issues are discovered, b
4444
* `make -k test-all docker-compose-down` - the same as above, but tears down the Docker services after running all the tests.
4545
* `make fmt` - runs formatter, this command requires the nightly toolchain to be installed by running `rustup toolchain install nightly`.
4646
* `make fix` - runs formatter and clippy checks.
47+
* `make typos` - runs the spellcheck tool over the codebase. (Install by running `cargo install typos`)
4748
* `make build-docs` - builds docs.
4849
* `make docker-compose-up` - starts Docker services.
4950
* `make docker-compose-down` - stops Docker services.

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ fmt:
4141
fix:
4242
@$(MAKE) -C $(QUICKWIT_SRC) fix
4343

44+
typos:
45+
typos
46+
4447
# Usage:
4548
# `make test-all` starts the Docker services and runs all the tests.
4649
# `make -k test-all docker-compose-down`, tears down the Docker services after running all the tests.

_typos.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[files]
2+
extend-exclude = ["**/*.json"]

build/cross-images/aarch64-unknown-linux-gnu.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG PBC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v21.5
44

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

1010
RUN dpkg --add-architecture arm64 && \

docs/concepts/querying.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ a few faulty documents.
6565
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:
6666

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

docs/guides/schemaless.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Quickwit lets you place the cursor on how strict you would like your schema to b
99

1010
:::note
1111

12-
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:
12+
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:
1313

1414
```bash
1515
./quickwit run

docs/internals/backward-compatibility.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Stored in metastore only:
1515
- FileBackedIndex
1616
- SplitMetadata.
1717

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

docs/reference/storage-uri.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ See our [Scaleway Setup Guide](../guides/storage-setup/scaleway-setup.md) for th
106106

107107
### Garage
108108

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

111111
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`.
112112

install.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# This is just a little script that can be downloaded from the internet to
66
# install Quickwit.
7-
# It just does platform detection, fetches the lastest appropriate release version from github
7+
# It just does platform detection, fetches the latest appropriate release version from github
88
# and execute the appropriate commands to download the binary.
99
#
1010
# Heavily inspired by the Vector & Meilisearch installation scripts
@@ -199,7 +199,7 @@ get_latest_version() {
199199
latest=""
200200
current_tag=""
201201
for release_info in $releases; do
202-
if [ $i -eq 0 ]; then # Cheking tag_name
202+
if [ $i -eq 0 ]; then # Checking tag_name
203203
if echo "$release_info" | grep -q "$GREP_SEMVER_REGEXP"; then # If it's not an alpha or beta release
204204
current_tag=$release_info
205205
else

quickwit/deny.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ignore = [
6666
[licenses]
6767
# The lint level for crates which do not have a detectable license
6868
unlicensed = "deny"
69-
# List of explictly allowed licenses
69+
# List of explicitly allowed licenses
7070
# See https://spdx.org/licenses/ for list of possible licenses
7171
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
7272
allow = [
@@ -85,7 +85,7 @@ allow = [
8585
"Zlib",
8686
"zlib-acknowledgement",
8787
]
88-
# List of explictly disallowed licenses
88+
# List of explicitly disallowed licenses
8989
# See https://spdx.org/licenses/ for list of possible licenses
9090
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
9191
deny = [

quickwit/quickwit-actors/src/actor_context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ impl<A: Actor> ActorContext<A> {
226226
/// more indicated.
227227
///
228228
/// Droppping the receiver channel will not cancel the
229-
/// processing of the messsage. It is a very common usage.
229+
/// processing of the message. It is a very common usage.
230230
/// In fact most actors are expected to send message in a
231231
/// fire-and-forget fashion.
232232
///

quickwit/quickwit-actors/src/channel_with_priority.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ mod tests {
434434
}
435435

436436
#[tokio::test]
437-
async fn test_try_recv_prority_corner_case() -> anyhow::Result<()> {
437+
async fn test_try_recv_priority_corner_case() -> anyhow::Result<()> {
438438
let (sender, receiver) = super::channel::<usize>(QueueCapacity::Unbounded);
439439
tokio::task::spawn(async move {
440440
tokio::time::sleep(Duration::from_millis(10)).await;

quickwit/quickwit-actors/src/command.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl<A: Actor> Handler<Command> for A {
113113

114114
/// Asks the actor to update its ObservableState.
115115
///
116-
/// The observation is then available using the `ActorHander::last_observation()`
116+
/// The observation is then available using the `ActorHandler::last_observation()`
117117
/// method.
118118
#[derive(Debug)]
119119
pub(crate) struct Observe;

quickwit/quickwit-actors/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub const HEARTBEAT: Duration = if cfg!(any(test, feature = "testsuite")) {
8989
/// Once this time is elapsed, we just return the last observation.
9090
const OBSERVE_TIMEOUT: Duration = Duration::from_secs(3);
9191

92-
/// Error that occured while calling `ActorContext::ask(..)` or `Universe::ask`
92+
/// Error that occurred while calling `ActorContext::ask(..)` or `Universe::ask`
9393
#[derive(Error, Debug)]
9494
pub enum AskError<E: fmt::Debug> {
9595
#[error("Message could not be delivered")]

quickwit/quickwit-actors/src/mailbox.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ mod tests {
555555
.await
556556
.unwrap();
557557
// That second message will present some backpressure, since the capacity is 0 and
558-
// the first message willl take 1000 micros to be processed.
558+
// the first message will take 1000 micros to be processed.
559559
mailbox
560560
.send_message_with_backpressure_counter(
561561
Duration::default(),

quickwit/quickwit-actors/src/registry.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl ActorJoinHandle {
248248
})
249249
}
250250

251-
/// Joins the actor and returns its exit status on the frist invocation.
251+
/// Joins the actor and returns its exit status on the first invocation.
252252
/// Returns None afterwards.
253253
pub(crate) async fn join(&self) -> ActorExitStatus {
254254
self.holder.clone().await

quickwit/quickwit-actors/src/universe.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ mod tests {
216216
async fn test_schedule_for_actor() {
217217
let universe = Universe::with_accelerated_time();
218218
let actor_with_schedule = CountingMinutesActor::default();
219-
let (_maibox, handler) = universe.spawn_builder().spawn(actor_with_schedule);
219+
let (_mailbox, handler) = universe.spawn_builder().spawn(actor_with_schedule);
220220
let count_after_initialization = handler.process_pending_and_observe().await.state;
221221
assert_eq!(count_after_initialization, 1);
222222
universe.sleep(Duration::from_secs(200)).await;
@@ -229,7 +229,7 @@ mod tests {
229229
async fn test_actor_quit_after_universe_quit() {
230230
let universe = Universe::with_accelerated_time();
231231
let actor_with_schedule = CountingMinutesActor::default();
232-
let (_maibox, handler) = universe.spawn_builder().spawn(actor_with_schedule);
232+
let (_mailbox, handler) = universe.spawn_builder().spawn(actor_with_schedule);
233233
universe.sleep(Duration::from_secs(200)).await;
234234
let res = universe.quit().await;
235235
assert_eq!(res.len(), 1);
@@ -241,7 +241,7 @@ mod tests {
241241
async fn test_universe_join_after_actor_quit() {
242242
let universe = Universe::default();
243243
let actor_with_schedule = CountingMinutesActor::default();
244-
let (_maibox, handler) = universe.spawn_builder().spawn(actor_with_schedule);
244+
let (_mailbox, handler) = universe.spawn_builder().spawn(actor_with_schedule);
245245
assert!(matches!(handler.quit().await, (ActorExitStatus::Quit, 1)));
246246
assert!(!universe
247247
.quit()
@@ -255,8 +255,8 @@ mod tests {
255255
let universe = Universe::default();
256256
let panicking_actor = ExitPanickingActor::default();
257257
let actor_with_schedule = CountingMinutesActor::default();
258-
let (_maibox, _handler) = universe.spawn_builder().spawn(panicking_actor);
259-
let (_maibox, _handler) = universe.spawn_builder().spawn(actor_with_schedule);
258+
let (_mailbox, _handler) = universe.spawn_builder().spawn(panicking_actor);
259+
let (_mailbox, _handler) = universe.spawn_builder().spawn(actor_with_schedule);
260260
assert!(universe
261261
.quit()
262262
.await

quickwit/quickwit-aws/src/region.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub fn region_from_str(region_str: &str) -> anyhow::Result<Region> {
7676
return Ok(region);
7777
}
7878
// Maybe this is a custom endpoint (for MinIO for instance).
79-
// We require custom endpoints to explicitely state the http/https protocol`.
79+
// We require custom endpoints to explicitly state the http/https protocol`.
8080
if !region_str.starts_with("http") {
8181
anyhow::bail!(
8282
"Invalid AWS region. Quickwit expects an AWS region code like `us-east-1` or a \

quickwit/quickwit-cli/src/index.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ pub async fn start_statistics_reporting_loop(
888888

889889
loop {
890890
// TODO fixme. The way we wait today is a bit lame: if the indexing pipeline exits, we will
891-
// stil wait up to an entire heartbeat... Ideally we should select between two
891+
// still wait up to an entire heartbeat... Ideally we should select between two
892892
// futures.
893893
report_interval.tick().await;
894894
// Try to receive with a timeout of 1 second.

quickwit/quickwit-cli/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ async fn load_quickwit_config(config_uri: &Uri) -> anyhow::Result<QuickwitConfig
126126
}
127127

128128
/// Runs connectivity checks for a given `metastore_uri` and `index_id`.
129-
/// Optionaly, it takes a `SourceConfig` that will be checked instead
129+
/// Optionally, it takes a `SourceConfig` that will be checked instead
130130
/// of the index's sources.
131131
pub async fn run_index_checklist(
132132
metastore_uri: &Uri,

quickwit/quickwit-cli/src/tool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ pub async fn start_statistics_reporting_loop(
580580

581581
loop {
582582
// TODO fixme. The way we wait today is a bit lame: if the indexing pipeline exits, we will
583-
// stil wait up to an entire heartbeat... Ideally we should select between two
583+
// still wait up to an entire heartbeat... Ideally we should select between two
584584
// futures.
585585
report_interval.tick().await;
586586
// Try to receive with a timeout of 1 second.

quickwit/quickwit-cli/tests/helpers.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub async fn wait_port_ready(port: u16) -> anyhow::Result<()> {
119119
}
120120
}
121121

122-
/// A struct to hold few info about the test environement.
122+
/// A struct to hold few info about the test environment.
123123
pub struct TestEnv {
124124
/// The temporary directory of the test.
125125
_tempdir: TempDir,
@@ -182,7 +182,7 @@ pub enum TestStorageType {
182182
LocalFileSystem,
183183
}
184184

185-
/// Creates all necessary artifacts in a test environement.
185+
/// Creates all necessary artifacts in a test environment.
186186
pub fn create_test_env(index_id: String, storage_type: TestStorageType) -> anyhow::Result<TestEnv> {
187187
let tempdir = tempdir()?;
188188
let data_dir_path = tempdir.path().join("data");

quickwit/quickwit-cluster/src/cluster.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ impl Cluster {
278278
info!(self_addr = ?self.gossip_listen_addr, "Shutting down chitchat.");
279279
let result = self.chitchat_handle.shutdown().await;
280280
if let Err(error) = result {
281-
error!(self_addr = ?self.gossip_listen_addr, error = ?error, "Error while shuting down chitchat.");
281+
error!(self_addr = ?self.gossip_listen_addr, error = ?error, "Error while shutting down chitchat.");
282282
}
283283

284284
self.stop.store(true, Ordering::Relaxed);
@@ -304,7 +304,7 @@ impl Cluster {
304304
Ok(())
305305
}
306306

307-
/// Set self readyness value.
307+
/// Set self readiness value.
308308
pub async fn set_self_node_ready(&self, ready: bool) {
309309
let health_value = if ready {
310310
HEALTH_VALUE_READY
@@ -499,7 +499,7 @@ mod tests {
499499
use super::*;
500500

501501
#[tokio::test]
502-
async fn test_cluster_single_node_readyness() -> anyhow::Result<()> {
502+
async fn test_cluster_single_node_readiness() -> anyhow::Result<()> {
503503
let transport = ChannelTransport::default();
504504
let cluster = create_cluster_for_test(Vec::new(), &[], &transport, false).await?;
505505
let members: Vec<SocketAddr> = cluster

quickwit/quickwit-common/src/checklist.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub fn print_checklist(check_list_results: &[(&str, anyhow::Result<()>)]) {
8383

8484
/// Run a checklist and print out its successes and failures on stdout.
8585
///
86-
/// If an error is encountered, the proccess will exit with exit code 1.
86+
/// If an error is encountered, the process will exit with exit code 1.
8787
pub fn run_checklist(checks: Vec<(&str, anyhow::Result<()>)>) -> Result<(), ChecklistError> {
8888
print_checklist(&checks);
8989
if !checks
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version: 0.4
22
searcher:
33
fast_field_cache_capacity: 10G
4-
# Typo here. It is supposed to be searchs.
5-
max_num_concurrent_split_searchs: 150
4+
# Typo here. It is supposed to be searches.
5+
max_num_concurrent_split_searchs_with_typo: 150

quickwit/quickwit-config/src/quickwit_config/serialize.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ mod tests {
486486
.await
487487
.unwrap_err();
488488
assert!(format!("{parsing_error:?}")
489-
.contains("unknown field `max_num_concurrent_split_searchs`"));
489+
.contains("unknown field `max_num_concurrent_split_searches_with_typo`"));
490490
}
491491

492492
#[tokio::test]

quickwit/quickwit-config/src/source_config/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub struct SourceConfig {
5050

5151
/// Maximum number of indexing pipelines spawned for the source on a given indexer.
5252
/// The maximum is reached only if there is enough `desired_num_pipelines` to run.
53-
/// The value is only used by sources that Quickwit knows how to distribute accross
53+
/// The value is only used by sources that Quickwit knows how to distribute across
5454
/// pipelines/nodes, that is for Kafka sources only.
5555
/// Example:
5656
/// - `max_num_pipelines_per_indexer=2`
@@ -59,7 +59,7 @@ pub struct SourceConfig {
5959
pub max_num_pipelines_per_indexer: usize,
6060
/// Number of desired indexing pipelines to run on a cluster for the source.
6161
/// This number could not be reach if there is not enough indexers.
62-
/// The value is only used by sources that Quickwit knows how to distribute accross
62+
/// The value is only used by sources that Quickwit knows how to distribute across
6363
/// pipelines/nodes, that is for Kafka sources only.
6464
/// Example:
6565
/// - `max_num_pipelines_per_indexer=1`

quickwit/quickwit-control-plane/src/indexing_plan.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ impl PhysicalIndexingPlan {
126126
/// Builds a [`PhysicalIndexingPlan`] by assigning each indexing tasks to a node ID.
127127
/// The algorithm first sort indexing tasks by (index_id, source_id).
128128
/// Then for each indexing tasks, it performs the following steps:
129-
/// 1. Sort node by rendez-vous hashing to make the assigment stable (it makes it
129+
/// 1. Sort node by rendez-vous hashing to make the assignment stable (it makes it
130130
/// deterministic too). This is not bullet proof as the node score has an impact
131-
/// on the assigment too.
131+
/// on the assignment too.
132132
/// 2. Select node candidates that can run the task, see [`select_node_candidates`]
133133
/// function.
134134
/// 3. For each node, compute a score for this task, the higher, the better, see
@@ -162,7 +162,7 @@ pub(crate) fn build_physical_indexing_plan(
162162
.expect("SourceConfig should always be present.");
163163
let candidates = select_node_candidates(&node_ids, &plan, source_config, &indexing_task);
164164

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

0 commit comments

Comments
 (0)