Skip to content

Commit 64452dd

Browse files
committed
Typos: fix minor typos in code
Mainly in comments. Fixes: scylladb#875 Signed-off-by: Yaniv Kaul <[email protected]>
1 parent b26e5bd commit 64452dd

File tree

21 files changed

+34
-34
lines changed

21 files changed

+34
-34
lines changed

docs/source/execution-profiles/priority.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Priorities of execution settings
22

3-
You always have a default execution profile set for the `Session`, either the default one or overriden upon `Session` creation. Moreover, you can set a profile for specific statements, in which case the statement's profile has higher priority. Some options are also available for specific statements to be set directly on them, such as request timeout and consistency. In such case, the directly set options are preferred over those specified in execution profiles.
3+
You always have a default execution profile set for the `Session`, either the default one or overridden upon `Session` creation. Moreover, you can set a profile for specific statements, in which case the statement's profile has higher priority. Some options are also available for specific statements to be set directly on them, such as request timeout and consistency. In such case, the directly set options are preferred over those specified in execution profiles.
44

55
> **Recap**\
66
> Priorities are as follows:\

docs/source/tracing/tracing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Query tracing
22

3-
The driver has utilites for monitoring the execution of queries.
3+
The driver has utilities for monitoring the execution of queries.
44
There are two separate ways to get information about what happened with a query: `Tracing` and `Query Execution History`.
55

66
### Tracing

scylla-cql/src/frame/value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ pub trait BatchValuesIterator<'a> {
493493

494494
/// Implements `BatchValuesIterator` from an `Iterator` over references to things that implement `ValueList`
495495
///
496-
/// Essentially used internally by this lib to provide implementors of `BatchValuesIterator` for cases
496+
/// Essentially used internally by this lib to provide implementers of `BatchValuesIterator` for cases
497497
/// that always serialize the same concrete `ValueList` type
498498
pub struct BatchValuesIteratorFromIterator<IT: Iterator> {
499499
it: IT,

scylla-cql/src/types/serialize/writers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl<'buf> RowWriter<'buf> {
5454
/// a [`WrittenCellProof`] object is returned
5555
/// in its stead. This is a type-level proof that the value was fully initialized
5656
/// and is used in [`SerializeCql::serialize`](`super::value::SerializeCql::serialize`)
57-
/// in order to enforce the implementor to fully initialize the provided handle
57+
/// in order to enforce the implementer to fully initialize the provided handle
5858
/// to CQL value.
5959
///
6060
/// Dropping this type without calling any of its methods will result

scylla-proxy/src/proxy.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,8 @@ impl RunningProxy {
431431
}
432432
}
433433

434-
/// Attempts to fetch the first error that has occured in proxy since last check.
435-
/// If no errors occured, returns Ok(()).
434+
/// Attempts to fetch the first error that has occurred in proxy since last check.
435+
/// If no errors occurred, returns Ok(()).
436436
pub fn sanity_check(&mut self) -> Result<(), ProxyError> {
437437
match self.error_sink.try_recv() {
438438
Ok(err) => Err(err),
@@ -444,13 +444,13 @@ impl RunningProxy {
444444
}
445445
}
446446

447-
/// Waits until an error occurs in proxy. If proxy finishes with no errors occured, returns Err(()).
447+
/// Waits until an error occurs in proxy. If proxy finishes with no errors occurred, returns Err(()).
448448
pub async fn wait_for_error(&mut self) -> Option<ProxyError> {
449449
self.error_sink.recv().await
450450
}
451451

452452
/// Requests termination of all proxy workers and awaits its completion.
453-
/// Returns the first error that occured in proxy.
453+
/// Returns the first error that occurred in proxy.
454454
pub async fn finish(mut self) -> Result<(), ProxyError> {
455455
self.terminate_signaler.send(()).map_err(|err| {
456456
ProxyError::AwaitFinishFailure(format!(
@@ -768,7 +768,7 @@ impl Doorkeeper {
768768

769769
// If ShardAwareness is aware (QueryNode or FixedNum variants) and the
770770
// proxy succeeded to know the shards count (in FixedNum we get it for
771-
// free, in QueryNode the initial Options query succceeded and Supported
771+
// free, in QueryNode the initial Options query succeeded and Supported
772772
// contained SCYLLA_SHARDS_NUM), then upon opening each connection to the
773773
// node, the proxy issues another Options requests and acknowledges the
774774
// shard it got connected to.
@@ -2446,7 +2446,7 @@ mod tests {
24462446
)
24472447
.await;
24482448

2449-
// Messages after REGISTER should be passed trough without feedback
2449+
// Messages after REGISTER should be passed through without feedback
24502450
for i in 0..5 {
24512451
perform_reqest_response(
24522452
RequestOpcode::Query,

scylla/src/cloud/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,13 @@ mod deserialize {
184184
// +optional
185185
apiVersion: Option<String>,
186186

187-
// Datacenters is a map of referencable names to datacenter configs.
187+
// Datacenters is a map of referenceable names to datacenter configs.
188188
datacenters: HashMap<String, Datacenter>,
189189

190-
// AuthInfos is a map of referencable names to authentication configs.
190+
// AuthInfos is a map of referenceable names to authentication configs.
191191
authInfos: HashMap<String, AuthInfo>,
192192

193-
// Contexts is a map of referencable names to context configs.
193+
// Contexts is a map of referenceable names to context configs.
194194
contexts: HashMap<String, Context>,
195195

196196
// CurrentContext is the name of the context that you would like to use by default.

scylla/src/history.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub trait HistoryListener: Debug + Send + Sync {
5656
node_addr: SocketAddr,
5757
) -> AttemptId;
5858

59-
/// Log that an attempt succeded.
59+
/// Log that an attempt succeeded.
6060
fn log_attempt_success(&self, attempt_id: AttemptId);
6161

6262
/// Log that an attempt ended with an error. The error and decision whether to retry the attempt are also included in the log.

scylla/src/routing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl Sharder {
102102
pub enum ShardingError {
103103
#[error("ShardInfo parameters missing")]
104104
MissingShardInfoParameter,
105-
#[error("ShardInfo parameters missing after unwraping")]
105+
#[error("ShardInfo parameters missing after unwrapping")]
106106
MissingUnwrapedShardInfoParameter,
107107
#[error("ShardInfo contains an invalid number of shards (0)")]
108108
ZeroShards,

scylla/src/statement/prepared_statement.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl PreparedStatement {
145145
Ok(buf.freeze())
146146
}
147147

148-
/// Determines which values consistute the partition key and puts them in order.
148+
/// Determines which values constitute the partition key and puts them in order.
149149
///
150150
/// This is a preparation step necessary for calculating token based on a prepared statement.
151151
pub(crate) fn extract_partition_key<'ps>(

scylla/src/transport/caching_session.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ mod tests {
381381
for expected_row in expected_rows.iter() {
382382
if !selected_rows.contains(expected_row) {
383383
panic!(
384-
"Expected {:?} to contain row: {:?}, but they didnt",
384+
"Expected {:?} to contain row: {:?}, but they didn't",
385385
selected_rows, expected_row
386386
);
387387
}

scylla/src/transport/connection.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ mod ssl_config {
290290
/// This struct encapsulates all Ssl-regarding configuration and helps pass it tidily through the code.
291291
//
292292
// There are 3 possible options for SslConfig, whose behaviour is somewhat subtle.
293-
// Option 1: No ssl configuration. Then it is None everytime.
293+
// Option 1: No ssl configuration. Then it is None every time.
294294
// Option 2: User-provided global SslContext. Then, a SslConfig is created upon Session creation
295295
// and henceforth stored in the ConnectionConfig.
296296
// Option 3: Serverless Cloud. The Option<SslConfig> remains None in ConnectionConfig until it reaches
@@ -1334,7 +1334,7 @@ impl Connection {
13341334
// or passing the negotiated features via a channel/mutex/etc.
13351335
// Fortunately, events do not need information about protocol features
13361336
// to be serialized (yet), therefore I'm leaving this problem for
1337-
// future implementors.
1337+
// future implementers.
13381338
let features = ProtocolFeatures::default(); // TODO: Use the right features
13391339

13401340
let response = Self::parse_response(task_response, compression, &features)?.response;

scylla/src/transport/load_balancing/default.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ mod tests {
987987
// and just `assert_eq` them
988988
let mut got = got.iter();
989989
for (group_id, expected) in self.groups.iter().enumerate() {
990-
// Collect the nodes that consistute the group
990+
// Collect the nodes that constitute the group
991991
// in the actual plan
992992
let got_group: Vec<_> = (&mut got).take(expected.len()).copied().collect();
993993

scylla/src/transport/locator/precomputed_replicas.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//! to compute those lists for each strategy used in cluster.
1111
//!
1212
//! Notes on Network Topology Strategy precomputation:
13-
//! The optimization mentioned above works ony if requested `replication factor` is <= `rack count`.
13+
//! The optimization mentioned above works only if requested `replication factor` is <= `rack count`.
1414
1515
use super::replication_info::ReplicationInfo;
1616
use super::TokenRing;

scylla/src/transport/locator/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ fn test_replica_set_choose(locator: &ReplicaLocator) {
496496
|| locator.replicas_for_token(Token { value: 75 }, &strategy, None);
497497

498498
// Verify that after a certain number of random selections, the set of selected replicas
499-
// will contain all nodes in the ring (replica set was created usin a strategy with
499+
// will contain all nodes in the ring (replica set was created using a strategy with
500500
// replication factors higher than node count).
501501
let mut chosen_replicas = HashSet::new();
502502
for _ in 0..32 {

scylla/src/transport/locator/token_ring.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl<ElemT> TokenRing<ElemT> {
4747
/// Provides an iterator over the ring's elements starting at the given token.
4848
/// The iterator traverses the whole ring in the direction of increasing tokens.
4949
/// After reaching the maximum token it wraps around and continues from the lowest one.
50-
/// The iterator visits each member once, it doesn't have an infinte length.
50+
/// The iterator visits each member once, it doesn't have an infinite length.
5151
/// To access the token along with the element you can use `ring_range_full`.
5252
pub fn ring_range(&self, token: Token) -> impl Iterator<Item = &ElemT> {
5353
self.ring_range_full(token).map(|(_t, e)| e)

scylla/src/transport/session.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl AddressTranslator for HashMap<SocketAddr, SocketAddr> {
116116
}
117117

118118
#[async_trait]
119-
// Notice: this is unefficient, but what else can we do with such poor representation as str?
119+
// Notice: this is inefficient, but what else can we do with such poor representation as str?
120120
// After all, the cluster size is small enough to make this irrelevant.
121121
impl AddressTranslator for HashMap<&'static str, &'static str> {
122122
async fn translate_address(
@@ -444,7 +444,7 @@ pub(crate) enum RunQueryResult<ResT> {
444444
/// Represents a CQL session, which can be used to communicate
445445
/// with the database
446446
impl Session {
447-
/// Estabilishes a CQL session with the database
447+
/// Establishes a CQL session with the database
448448
///
449449
/// Usually it's easier to use [SessionBuilder](crate::transport::session_builder::SessionBuilder)
450450
/// instead of calling `Session::connect` directly, because it's more convenient.

scylla/src/transport/session_builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ impl<K: SessionBuilderKind> GenericSessionBuilder<K> {
708708
pub fn keepalive_timeout(mut self, timeout: Duration) -> Self {
709709
if timeout <= Duration::from_secs(1) {
710710
warn!(
711-
"Setting the keepalive timeout to low values ({:?}) is not recommended as it may aggresively close connections. Consider setting it above 5 seconds.",
711+
"Setting the keepalive timeout to low values ({:?}) is not recommended as it may aggressively close connections. Consider setting it above 5 seconds.",
712712
timeout
713713
);
714714
}

scylla/src/transport/session_test.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ async fn test_use_keyspace_case_sensitivity() {
724724
.await
725725
.unwrap();
726726

727-
// Use uppercase keyspace without case sesitivity
727+
// Use uppercase keyspace without case sensitivity
728728
// Should select the lowercase one
729729
session.use_keyspace(ks_upper.clone(), false).await.unwrap();
730730

@@ -740,7 +740,7 @@ async fn test_use_keyspace_case_sensitivity() {
740740

741741
assert_eq!(rows, vec!["lowercase".to_string()]);
742742

743-
// Use uppercase keyspace with case sesitivity
743+
// Use uppercase keyspace with case sensitivity
744744
// Should select the uppercase one
745745
session.use_keyspace(ks_upper, true).await.unwrap();
746746

@@ -2221,7 +2221,7 @@ async fn assert_test_batch_table_rows_contain(sess: &Session, expected_rows: &[(
22212221
for expected_row in expected_rows.iter() {
22222222
if !selected_rows.contains(expected_row) {
22232223
panic!(
2224-
"Expected {:?} to contain row: {:?}, but they didnt",
2224+
"Expected {:?} to contain row: {:?}, but they didn't",
22252225
selected_rows, expected_row
22262226
);
22272227
}

scylla/src/transport/silent_prepare_batch_test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async fn assert_test_batch_table_rows_contain(sess: &Session, expected_rows: &[(
102102
for expected_row in expected_rows.iter() {
103103
if !selected_rows.contains(expected_row) {
104104
panic!(
105-
"Expected {:?} to contain row: {:?}, but they didnt",
105+
"Expected {:?} to contain row: {:?}, but they didn't",
106106
selected_rows, expected_row
107107
);
108108
}

test/dockerized/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99

1010
IMAGE_NAME="scylla_rust_driver_testing"
1111

12-
# Build a new image with embeded driver source files and deletes the
12+
# Build a new image with embedded driver source files and deletes the
1313
# previously built image
1414
docker tag "$IMAGE_NAME:latest" "$IMAGE_NAME:previous" &>/dev/null
1515
if docker build -f test/dockerized/Dockerfile -t "$IMAGE_NAME:latest" . ; then

test/tls/scylla.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ commitlog_total_space_in_mb: -1
361361
# tombstones seen in memory so we can return them to the coordinator, which
362362
# will use them to make sure other replicas also know about the deleted rows.
363363
# With workloads that generate a lot of tombstones, this can cause performance
364-
# problems and even exaust the server heap.
364+
# problems and even exhaust the server heap.
365365
# (http://www.datastax.com/dev/blog/cassandra-anti-patterns-queues-and-queue-like-datasets)
366366
# Adjust the thresholds here if you understand the dangers and want to
367367
# scan more tombstones anyway. These thresholds may also be adjusted at runtime
@@ -460,7 +460,7 @@ client_encryption_options:
460460
# not met, performance and reliability can be degraded.
461461
#
462462
# These requirements include:
463-
# - A filesystem with good support for aysnchronous I/O (AIO). Currently,
463+
# - A filesystem with good support for asynchronous I/O (AIO). Currently,
464464
# this means XFS.
465465
#
466466
# false: strict environment checks are in place; do not start if they are not met.
@@ -493,7 +493,7 @@ client_encryption_options:
493493
# [shard0] [shard1] ... [shardN-1] [shard0] [shard1] ... [shardN-1] ...
494494
#
495495
# Scylla versions 1.6 and below used just one repetition of the pattern;
496-
# this intefered with data placement among nodes (vnodes).
496+
# this interfered with data placement among nodes (vnodes).
497497
#
498498
# Scylla versions 1.7 and above use 4096 repetitions of the pattern; this
499499
# provides for better data distribution.

0 commit comments

Comments
 (0)