Skip to content

Commit

Permalink
Merge pull request #876 from mykaul/spelling
Browse files Browse the repository at this point in the history
Typos: fix minor typos in code
  • Loading branch information
piodul authored Dec 11, 2023
2 parents b26e5bd + 64452dd commit 7d06b89
Show file tree
Hide file tree
Showing 21 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion docs/source/execution-profiles/priority.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Priorities of execution settings

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.
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.

> **Recap**\
> Priorities are as follows:\
Expand Down
2 changes: 1 addition & 1 deletion docs/source/tracing/tracing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Query tracing

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

### Tracing
Expand Down
2 changes: 1 addition & 1 deletion scylla-cql/src/frame/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ pub trait BatchValuesIterator<'a> {

/// Implements `BatchValuesIterator` from an `Iterator` over references to things that implement `ValueList`
///
/// Essentially used internally by this lib to provide implementors of `BatchValuesIterator` for cases
/// Essentially used internally by this lib to provide implementers of `BatchValuesIterator` for cases
/// that always serialize the same concrete `ValueList` type
pub struct BatchValuesIteratorFromIterator<IT: Iterator> {
it: IT,
Expand Down
2 changes: 1 addition & 1 deletion scylla-cql/src/types/serialize/writers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl<'buf> RowWriter<'buf> {
/// a [`WrittenCellProof`] object is returned
/// in its stead. This is a type-level proof that the value was fully initialized
/// and is used in [`SerializeCql::serialize`](`super::value::SerializeCql::serialize`)
/// in order to enforce the implementor to fully initialize the provided handle
/// in order to enforce the implementer to fully initialize the provided handle
/// to CQL value.
///
/// Dropping this type without calling any of its methods will result
Expand Down
12 changes: 6 additions & 6 deletions scylla-proxy/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ impl RunningProxy {
}
}

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

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

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

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

// Messages after REGISTER should be passed trough without feedback
// Messages after REGISTER should be passed through without feedback
for i in 0..5 {
perform_reqest_response(
RequestOpcode::Query,
Expand Down
6 changes: 3 additions & 3 deletions scylla/src/cloud/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ mod deserialize {
// +optional
apiVersion: Option<String>,

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

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

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

// CurrentContext is the name of the context that you would like to use by default.
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub trait HistoryListener: Debug + Send + Sync {
node_addr: SocketAddr,
) -> AttemptId;

/// Log that an attempt succeded.
/// Log that an attempt succeeded.
fn log_attempt_success(&self, attempt_id: AttemptId);

/// Log that an attempt ended with an error. The error and decision whether to retry the attempt are also included in the log.
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl Sharder {
pub enum ShardingError {
#[error("ShardInfo parameters missing")]
MissingShardInfoParameter,
#[error("ShardInfo parameters missing after unwraping")]
#[error("ShardInfo parameters missing after unwrapping")]
MissingUnwrapedShardInfoParameter,
#[error("ShardInfo contains an invalid number of shards (0)")]
ZeroShards,
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/statement/prepared_statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl PreparedStatement {
Ok(buf.freeze())
}

/// Determines which values consistute the partition key and puts them in order.
/// Determines which values constitute the partition key and puts them in order.
///
/// This is a preparation step necessary for calculating token based on a prepared statement.
pub(crate) fn extract_partition_key<'ps>(
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/transport/caching_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ mod tests {
for expected_row in expected_rows.iter() {
if !selected_rows.contains(expected_row) {
panic!(
"Expected {:?} to contain row: {:?}, but they didnt",
"Expected {:?} to contain row: {:?}, but they didn't",
selected_rows, expected_row
);
}
Expand Down
4 changes: 2 additions & 2 deletions scylla/src/transport/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ mod ssl_config {
/// This struct encapsulates all Ssl-regarding configuration and helps pass it tidily through the code.
//
// There are 3 possible options for SslConfig, whose behaviour is somewhat subtle.
// Option 1: No ssl configuration. Then it is None everytime.
// Option 1: No ssl configuration. Then it is None every time.
// Option 2: User-provided global SslContext. Then, a SslConfig is created upon Session creation
// and henceforth stored in the ConnectionConfig.
// Option 3: Serverless Cloud. The Option<SslConfig> remains None in ConnectionConfig until it reaches
Expand Down Expand Up @@ -1334,7 +1334,7 @@ impl Connection {
// or passing the negotiated features via a channel/mutex/etc.
// Fortunately, events do not need information about protocol features
// to be serialized (yet), therefore I'm leaving this problem for
// future implementors.
// future implementers.
let features = ProtocolFeatures::default(); // TODO: Use the right features

let response = Self::parse_response(task_response, compression, &features)?.response;
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/transport/load_balancing/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ mod tests {
// and just `assert_eq` them
let mut got = got.iter();
for (group_id, expected) in self.groups.iter().enumerate() {
// Collect the nodes that consistute the group
// Collect the nodes that constitute the group
// in the actual plan
let got_group: Vec<_> = (&mut got).take(expected.len()).copied().collect();

Expand Down
2 changes: 1 addition & 1 deletion scylla/src/transport/locator/precomputed_replicas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//! to compute those lists for each strategy used in cluster.
//!
//! Notes on Network Topology Strategy precomputation:
//! The optimization mentioned above works ony if requested `replication factor` is <= `rack count`.
//! The optimization mentioned above works only if requested `replication factor` is <= `rack count`.
use super::replication_info::ReplicationInfo;
use super::TokenRing;
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/transport/locator/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ fn test_replica_set_choose(locator: &ReplicaLocator) {
|| locator.replicas_for_token(Token { value: 75 }, &strategy, None);

// Verify that after a certain number of random selections, the set of selected replicas
// will contain all nodes in the ring (replica set was created usin a strategy with
// will contain all nodes in the ring (replica set was created using a strategy with
// replication factors higher than node count).
let mut chosen_replicas = HashSet::new();
for _ in 0..32 {
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/transport/locator/token_ring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl<ElemT> TokenRing<ElemT> {
/// Provides an iterator over the ring's elements starting at the given token.
/// The iterator traverses the whole ring in the direction of increasing tokens.
/// After reaching the maximum token it wraps around and continues from the lowest one.
/// The iterator visits each member once, it doesn't have an infinte length.
/// The iterator visits each member once, it doesn't have an infinite length.
/// To access the token along with the element you can use `ring_range_full`.
pub fn ring_range(&self, token: Token) -> impl Iterator<Item = &ElemT> {
self.ring_range_full(token).map(|(_t, e)| e)
Expand Down
4 changes: 2 additions & 2 deletions scylla/src/transport/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl AddressTranslator for HashMap<SocketAddr, SocketAddr> {
}

#[async_trait]
// Notice: this is unefficient, but what else can we do with such poor representation as str?
// Notice: this is inefficient, but what else can we do with such poor representation as str?
// After all, the cluster size is small enough to make this irrelevant.
impl AddressTranslator for HashMap<&'static str, &'static str> {
async fn translate_address(
Expand Down Expand Up @@ -444,7 +444,7 @@ pub(crate) enum RunQueryResult<ResT> {
/// Represents a CQL session, which can be used to communicate
/// with the database
impl Session {
/// Estabilishes a CQL session with the database
/// Establishes a CQL session with the database
///
/// Usually it's easier to use [SessionBuilder](crate::transport::session_builder::SessionBuilder)
/// instead of calling `Session::connect` directly, because it's more convenient.
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/transport/session_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ impl<K: SessionBuilderKind> GenericSessionBuilder<K> {
pub fn keepalive_timeout(mut self, timeout: Duration) -> Self {
if timeout <= Duration::from_secs(1) {
warn!(
"Setting the keepalive timeout to low values ({:?}) is not recommended as it may aggresively close connections. Consider setting it above 5 seconds.",
"Setting the keepalive timeout to low values ({:?}) is not recommended as it may aggressively close connections. Consider setting it above 5 seconds.",
timeout
);
}
Expand Down
6 changes: 3 additions & 3 deletions scylla/src/transport/session_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ async fn test_use_keyspace_case_sensitivity() {
.await
.unwrap();

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

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

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

// Use uppercase keyspace with case sesitivity
// Use uppercase keyspace with case sensitivity
// Should select the uppercase one
session.use_keyspace(ks_upper, true).await.unwrap();

Expand Down Expand Up @@ -2221,7 +2221,7 @@ async fn assert_test_batch_table_rows_contain(sess: &Session, expected_rows: &[(
for expected_row in expected_rows.iter() {
if !selected_rows.contains(expected_row) {
panic!(
"Expected {:?} to contain row: {:?}, but they didnt",
"Expected {:?} to contain row: {:?}, but they didn't",
selected_rows, expected_row
);
}
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/transport/silent_prepare_batch_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async fn assert_test_batch_table_rows_contain(sess: &Session, expected_rows: &[(
for expected_row in expected_rows.iter() {
if !selected_rows.contains(expected_row) {
panic!(
"Expected {:?} to contain row: {:?}, but they didnt",
"Expected {:?} to contain row: {:?}, but they didn't",
selected_rows, expected_row
);
}
Expand Down
2 changes: 1 addition & 1 deletion test/dockerized/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fi

IMAGE_NAME="scylla_rust_driver_testing"

# Build a new image with embeded driver source files and deletes the
# Build a new image with embedded driver source files and deletes the
# previously built image
docker tag "$IMAGE_NAME:latest" "$IMAGE_NAME:previous" &>/dev/null
if docker build -f test/dockerized/Dockerfile -t "$IMAGE_NAME:latest" . ; then
Expand Down
6 changes: 3 additions & 3 deletions test/tls/scylla.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ commitlog_total_space_in_mb: -1
# tombstones seen in memory so we can return them to the coordinator, which
# will use them to make sure other replicas also know about the deleted rows.
# With workloads that generate a lot of tombstones, this can cause performance
# problems and even exaust the server heap.
# problems and even exhaust the server heap.
# (http://www.datastax.com/dev/blog/cassandra-anti-patterns-queues-and-queue-like-datasets)
# Adjust the thresholds here if you understand the dangers and want to
# scan more tombstones anyway. These thresholds may also be adjusted at runtime
Expand Down Expand Up @@ -460,7 +460,7 @@ client_encryption_options:
# not met, performance and reliability can be degraded.
#
# These requirements include:
# - A filesystem with good support for aysnchronous I/O (AIO). Currently,
# - A filesystem with good support for asynchronous I/O (AIO). Currently,
# this means XFS.
#
# false: strict environment checks are in place; do not start if they are not met.
Expand Down Expand Up @@ -493,7 +493,7 @@ client_encryption_options:
# [shard0] [shard1] ... [shardN-1] [shard0] [shard1] ... [shardN-1] ...
#
# Scylla versions 1.6 and below used just one repetition of the pattern;
# this intefered with data placement among nodes (vnodes).
# this interfered with data placement among nodes (vnodes).
#
# Scylla versions 1.7 and above use 4096 repetitions of the pattern; this
# provides for better data distribution.
Expand Down

0 comments on commit 7d06b89

Please sign in to comment.