diff --git a/docs/source/execution-profiles/priority.md b/docs/source/execution-profiles/priority.md index 92a46d50c4..4ae22d2c86 100644 --- a/docs/source/execution-profiles/priority.md +++ b/docs/source/execution-profiles/priority.md @@ -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:\ diff --git a/docs/source/tracing/tracing.md b/docs/source/tracing/tracing.md index 2d54fb333c..dbf50ce2c0 100644 --- a/docs/source/tracing/tracing.md +++ b/docs/source/tracing/tracing.md @@ -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 diff --git a/scylla-cql/src/frame/value.rs b/scylla-cql/src/frame/value.rs index a5fa8462f4..fa3355f4a8 100644 --- a/scylla-cql/src/frame/value.rs +++ b/scylla-cql/src/frame/value.rs @@ -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: IT, diff --git a/scylla-cql/src/types/serialize/writers.rs b/scylla-cql/src/types/serialize/writers.rs index 9b2be47998..cd1ccd7f62 100644 --- a/scylla-cql/src/types/serialize/writers.rs +++ b/scylla-cql/src/types/serialize/writers.rs @@ -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 diff --git a/scylla-proxy/src/proxy.rs b/scylla-proxy/src/proxy.rs index a4aed08c7d..11acf465d0 100644 --- a/scylla-proxy/src/proxy.rs +++ b/scylla-proxy/src/proxy.rs @@ -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), @@ -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 { 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!( @@ -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. @@ -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, diff --git a/scylla/src/cloud/config.rs b/scylla/src/cloud/config.rs index 74a088726a..9984cba34e 100644 --- a/scylla/src/cloud/config.rs +++ b/scylla/src/cloud/config.rs @@ -184,13 +184,13 @@ mod deserialize { // +optional apiVersion: Option, - // Datacenters is a map of referencable names to datacenter configs. + // Datacenters is a map of referenceable names to datacenter configs. datacenters: HashMap, - // AuthInfos is a map of referencable names to authentication configs. + // AuthInfos is a map of referenceable names to authentication configs. authInfos: HashMap, - // Contexts is a map of referencable names to context configs. + // Contexts is a map of referenceable names to context configs. contexts: HashMap, // CurrentContext is the name of the context that you would like to use by default. diff --git a/scylla/src/history.rs b/scylla/src/history.rs index 34c2c19244..9109601c23 100644 --- a/scylla/src/history.rs +++ b/scylla/src/history.rs @@ -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. diff --git a/scylla/src/routing.rs b/scylla/src/routing.rs index d6fff76466..e54dfcaec9 100644 --- a/scylla/src/routing.rs +++ b/scylla/src/routing.rs @@ -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, diff --git a/scylla/src/statement/prepared_statement.rs b/scylla/src/statement/prepared_statement.rs index 58d8b9ea3d..8abdf6bd91 100644 --- a/scylla/src/statement/prepared_statement.rs +++ b/scylla/src/statement/prepared_statement.rs @@ -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>( diff --git a/scylla/src/transport/caching_session.rs b/scylla/src/transport/caching_session.rs index 82e12b1ab2..3d3dfa0e17 100644 --- a/scylla/src/transport/caching_session.rs +++ b/scylla/src/transport/caching_session.rs @@ -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 ); } diff --git a/scylla/src/transport/connection.rs b/scylla/src/transport/connection.rs index de79c5d130..2ecd37b290 100644 --- a/scylla/src/transport/connection.rs +++ b/scylla/src/transport/connection.rs @@ -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 remains None in ConnectionConfig until it reaches @@ -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; diff --git a/scylla/src/transport/load_balancing/default.rs b/scylla/src/transport/load_balancing/default.rs index d1554babf1..3fdeef18ef 100644 --- a/scylla/src/transport/load_balancing/default.rs +++ b/scylla/src/transport/load_balancing/default.rs @@ -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(); diff --git a/scylla/src/transport/locator/precomputed_replicas.rs b/scylla/src/transport/locator/precomputed_replicas.rs index de6d5e1a63..0a9256b7e8 100644 --- a/scylla/src/transport/locator/precomputed_replicas.rs +++ b/scylla/src/transport/locator/precomputed_replicas.rs @@ -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; diff --git a/scylla/src/transport/locator/test.rs b/scylla/src/transport/locator/test.rs index d09a22d7c1..bb74ee0469 100644 --- a/scylla/src/transport/locator/test.rs +++ b/scylla/src/transport/locator/test.rs @@ -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 { diff --git a/scylla/src/transport/locator/token_ring.rs b/scylla/src/transport/locator/token_ring.rs index 686d8e0a90..cd5b4de8f3 100644 --- a/scylla/src/transport/locator/token_ring.rs +++ b/scylla/src/transport/locator/token_ring.rs @@ -47,7 +47,7 @@ impl TokenRing { /// 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 { self.ring_range_full(token).map(|(_t, e)| e) diff --git a/scylla/src/transport/session.rs b/scylla/src/transport/session.rs index 24cc481c93..39fbdf78b5 100644 --- a/scylla/src/transport/session.rs +++ b/scylla/src/transport/session.rs @@ -116,7 +116,7 @@ impl AddressTranslator for HashMap { } #[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( @@ -444,7 +444,7 @@ pub(crate) enum RunQueryResult { /// 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. diff --git a/scylla/src/transport/session_builder.rs b/scylla/src/transport/session_builder.rs index 394a348ca2..09ee03b961 100644 --- a/scylla/src/transport/session_builder.rs +++ b/scylla/src/transport/session_builder.rs @@ -708,7 +708,7 @@ impl GenericSessionBuilder { 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 ); } diff --git a/scylla/src/transport/session_test.rs b/scylla/src/transport/session_test.rs index 805217053d..79df0834e3 100644 --- a/scylla/src/transport/session_test.rs +++ b/scylla/src/transport/session_test.rs @@ -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(); @@ -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(); @@ -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 ); } diff --git a/scylla/src/transport/silent_prepare_batch_test.rs b/scylla/src/transport/silent_prepare_batch_test.rs index 3a2ed83baa..469c90b49f 100644 --- a/scylla/src/transport/silent_prepare_batch_test.rs +++ b/scylla/src/transport/silent_prepare_batch_test.rs @@ -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 ); } diff --git a/test/dockerized/run.sh b/test/dockerized/run.sh index 54c44ea2cb..c7bb989584 100755 --- a/test/dockerized/run.sh +++ b/test/dockerized/run.sh @@ -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 diff --git a/test/tls/scylla.yaml b/test/tls/scylla.yaml index ee4eee6a45..cd36533c4d 100644 --- a/test/tls/scylla.yaml +++ b/test/tls/scylla.yaml @@ -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 @@ -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. @@ -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.