diff --git a/alternator/conditions.cc b/alternator/conditions.cc index 011ce3fca1..09147a5988 100644 --- a/alternator/conditions.cc +++ b/alternator/conditions.cc @@ -342,7 +342,7 @@ static bool check_NOT_NULL(const rjson::value* val) { } // Only types S, N or B (string, number or bytes) may be compared by the -// various comparion operators - lt, le, gt, ge, and between. +// various comparison operators - lt, le, gt, ge, and between. // Note that in particular, if the value is missing (v->IsNull()), this // check returns false. static bool check_comparable_type(const rjson::value& v) { diff --git a/alternator/error.hh b/alternator/error.hh index 9da2a55d71..bb01d4807d 100644 --- a/alternator/error.hh +++ b/alternator/error.hh @@ -29,7 +29,7 @@ public: std::string _type; std::string _msg; // Additional data attached to the error, null value if not set. It's wrapped in copyable_value - // class because copy contructor is required for exception classes otherwise it won't compile + // class because copy constructor is required for exception classes otherwise it won't compile // (despite that its use may be optimized away). rjson::copyable_value _extra_fields; api_error(std::string type, std::string msg, status_type http_code = status_type::bad_request, diff --git a/alternator/executor.cc b/alternator/executor.cc index fe814ba531..fe5eaac5ca 100644 --- a/alternator/executor.cc +++ b/alternator/executor.cc @@ -994,7 +994,7 @@ static future create_table_on_shard0(tracing::tra add_column(view_builder, view_range_key, attribute_definitions, column_kind::clustering_key); } // Base key columns which aren't part of the index's key need to - // be added to the view nontheless, as (additional) clustering + // be added to the view nonetheless, as (additional) clustering // key(s). if (hash_key != view_hash_key && hash_key != view_range_key) { add_column(view_builder, hash_key, attribute_definitions, column_kind::clustering_key); @@ -1051,7 +1051,7 @@ static future create_table_on_shard0(tracing::tra } add_column(view_builder, view_range_key, attribute_definitions, column_kind::clustering_key); // Base key columns which aren't part of the index's key need to - // be added to the view nontheless, as (additional) clustering + // be added to the view nonetheless, as (additional) clustering // key(s). if (!range_key.empty() && view_range_key != range_key) { add_column(view_builder, range_key, attribute_definitions, column_kind::clustering_key); @@ -2268,7 +2268,7 @@ enum class select_type { regular, count, projection }; static select_type parse_select(const rjson::value& request, table_or_view_type table_type) { const rjson::value* select_value = rjson::find(request, "Select"); if (!select_value) { - // If "Select" is not specificed, it defaults to ALL_ATTRIBUTES + // If "Select" is not specified, it defaults to ALL_ATTRIBUTES // on a base table, or ALL_PROJECTED_ATTRIBUTES on an index return table_type == table_or_view_type::base ? select_type::regular : select_type::projection; @@ -3124,7 +3124,7 @@ future executor::update_item(client_state& client // Check according to the request's "ConsistentRead" field, which consistency // level we need to use for the read. The field can be True for strongly // consistent reads, or False for eventually consistent reads, or if this -// field is absense, we default to eventually consistent reads. +// field is absence, we default to eventually consistent reads. // In Scylla, eventually-consistent reads are implemented as consistency // level LOCAL_ONE, and strongly-consistent reads as LOCAL_QUORUM. static db::consistency_level get_read_consistency(const rjson::value& request) { @@ -3572,7 +3572,7 @@ public: // the JSON but take them out before finally returning the JSON. if (_attrs_to_get) { _filter.for_filters_on([&] (std::string_view attr) { - std::string a(attr); // no heterogenous maps searches :-( + std::string a(attr); // no heterogeneous maps searches :-( if (!_attrs_to_get->contains(a)) { _extra_filter_attrs.emplace(std::move(a)); } diff --git a/alternator/rmw_operation.hh b/alternator/rmw_operation.hh index 9ea24c86a4..427f2b08cc 100644 --- a/alternator/rmw_operation.hh +++ b/alternator/rmw_operation.hh @@ -19,7 +19,7 @@ namespace alternator { // operations which may involve a read of the item before the write // (so-called Read-Modify-Write operations). These operations include PutItem, // UpdateItem and DeleteItem: All of these may be conditional operations (the -// "Expected" parameter) which requir a read before the write, and UpdateItem +// "Expected" parameter) which require a read before the write, and UpdateItem // may also have an update expression which refers to the item's old value. // // The code below supports running the read and the write together as one @@ -81,7 +81,7 @@ protected: // it (see explanation below), but note that because apply() may be // called more than once, if apply() will sometimes set this field it // must set it (even if just to the default empty value) every time. - // Additionaly when _returnvalues_on_condition_check_failure is ALL_OLD + // Additionally when _returnvalues_on_condition_check_failure is ALL_OLD // then condition check failure will also result in storing values here. mutable rjson::value _return_attributes; public: diff --git a/alternator/serialization.cc b/alternator/serialization.cc index a44d8cbb64..96d64c00e9 100644 --- a/alternator/serialization.cc +++ b/alternator/serialization.cc @@ -59,7 +59,7 @@ type_representation represent_type(alternator_type atype) { // calculate its magnitude and precision from its scale() and unscaled_value(). // So in the following ugly implementation we calculate them from the string // representation instead. We assume the number was already parsed -// sucessfully to a big_decimal to it follows its syntax rules. +// successfully to a big_decimal to it follows its syntax rules. // // FIXME: rewrite this function to take a big_decimal, not a string. // Maybe a snippet like this can help: diff --git a/alternator/streams.cc b/alternator/streams.cc index 58051e042f..8ac4ca58a5 100644 --- a/alternator/streams.cc +++ b/alternator/streams.cc @@ -280,7 +280,7 @@ struct sequence_number { * Timeuuids viewed as msb<<64|lsb are _not_, * but they are still sorted as * timestamp() << 64|lsb - * so we can simpy unpack the mangled msb + * so we can simply unpack the mangled msb * and use as hi 64 in our "bignum". */ uint128_t hi = uint64_t(num.uuid.timestamp()); @@ -419,7 +419,7 @@ using namespace std::string_literals; * * In scylla, this is sort of akin to an ID having corresponding ID/ID:s * that cover the token range it represents. Because ID:s are per - * vnode shard however, this relation can be somewhat ambigous. + * vnode shard however, this relation can be somewhat ambiguous. * We still provide some semblance of this by finding the ID in * older generation that has token start < current ID token start. * This will be a partial overlap, but it is the best we can do. @@ -526,7 +526,7 @@ future executor::describe_stream(client_state& cl // (see explanation above) since we want to find closest // token boundary when determining parent. // #7346 - we processed and searched children/parents in - // stored order, which is not neccesarily token order, + // stored order, which is not necessarily token order, // so the finding of "closest" token boundary (using upper bound) // could give somewhat weird results. static auto token_cmp = [](const cdc::stream_id& id1, const cdc::stream_id& id2) { diff --git a/alternator/ttl.cc b/alternator/ttl.cc index e16ac1cab5..aebea56a6b 100644 --- a/alternator/ttl.cc +++ b/alternator/ttl.cc @@ -155,7 +155,7 @@ future executor::describe_time_to_live(client_sta // node owning this range as a "primary range" (the first node in the ring // with this range), but when this node is down, the secondary owner (the // second in the ring) may take over. -// An expiration thread is reponsible for all tables which need expiration +// An expiration thread is responsible for all tables which need expiration // scans. Currently, the different tables are scanned sequentially (not in // parallel). // The expiration thread scans item using CL=QUORUM to ensures that it reads diff --git a/api/storage_proxy.cc b/api/storage_proxy.cc index 298d0a2652..64f46e1669 100644 --- a/api/storage_proxy.cc +++ b/api/storage_proxy.cc @@ -27,7 +27,7 @@ utils::time_estimated_histogram timed_rate_moving_average_summary_merge(utils::t } /** - * This function implement a two dimentional map reduce where + * This function implement a two dimensional map reduce where * the first level is a distributed storage_proxy class and the * second level is the stats per scheduling group class. * @param d - a reference to the storage_proxy distributed class. @@ -48,7 +48,7 @@ future two_dimensional_map_reduce(distributed& d, } /** - * This function implement a two dimentional map reduce where + * This function implement a two dimensional map reduce where * the first level is a distributed storage_proxy class and the * second level is the stats per scheduling group class. * @param d - a reference to the storage_proxy distributed class. diff --git a/api/storage_service.cc b/api/storage_service.cc index 14ef2b4091..9dd955eb72 100644 --- a/api/storage_service.cc +++ b/api/storage_service.cc @@ -1462,7 +1462,7 @@ void unset_storage_service(http_context& ctx, routes& r) { enum class scrub_status { successful = 0, aborted, - unable_to_cancel, // Not used in Scylla, included to ensure compability with nodetool api. + unable_to_cancel, // Not used in Scylla, included to ensure compatibility with nodetool api. validation_errors, }; diff --git a/auth/passwords.cc b/auth/passwords.cc index 3167285ba2..f345f3484c 100644 --- a/auth/passwords.cc +++ b/auth/passwords.cc @@ -68,4 +68,4 @@ bool check(const sstring& pass, const sstring& salted_hash) { return detail::hash_with_salt(pass, salted_hash) == salted_hash; } -} // namespace auth::paswords +} // namespace auth::passwords diff --git a/auth/passwords.hh b/auth/passwords.hh index 657ad512bb..cabe46e7f3 100644 --- a/auth/passwords.hh +++ b/auth/passwords.hh @@ -88,7 +88,7 @@ sstring hash_with_salt(const sstring& pass, const sstring& salt); /// Prior to applying the hashing function, random salt is amended to the cleartext. The random salt bytes are generated /// according to the random number engine `g`. /// -/// The result is the encrypted cyphertext, and also the salt used but in a implementation-specific format. +/// The result is the encrypted ciphertext, and also the salt used but in a implementation-specific format. /// /// \throws \ref std::system_error when the implementation-specific implementation fails to hash the cleartext. /// diff --git a/cdc/log.cc b/cdc/log.cc index 5fa927ab8a..4fb857a173 100644 --- a/cdc/log.cc +++ b/cdc/log.cc @@ -183,7 +183,7 @@ public: // if we are turning off cdc we can skip this, since even if columns change etc, // any writer should see cdc -> off together with any actual schema changes to // base table, so should never try to write to non-existent log column etc. - // note that if user has set ttl=0 in cdc options, he is still reponsible + // note that if user has set ttl=0 in cdc options, he is still responsible // for emptying the log. if (is_cdc) { auto& db = _ctxt._proxy.get_db().local(); diff --git a/cdc/metadata.hh b/cdc/metadata.hh index 7ca8d7dadf..3b13d50efd 100644 --- a/cdc/metadata.hh +++ b/cdc/metadata.hh @@ -28,7 +28,7 @@ class topology_description; * (i.e., to pick partition keys for these writes). */ class metadata final { - // Note: we use db_clock (1ms resolution) for generation timestaps + // Note: we use db_clock (1ms resolution) for generation timestamps // (because we need to insert them into tables using columns of timestamp types, // and the native type of our columns' timestamp_type is db_clock::time_point). // On the other hand, timestamp_clock (1us resolution) is used for mutation timestamps, diff --git a/cdc/split.cc b/cdc/split.cc index 5840dd76ff..24d46cc3e1 100644 --- a/cdc/split.cc +++ b/cdc/split.cc @@ -462,7 +462,7 @@ api::timestamp_type find_timestamp(const mutation& m) { * The visitor uses the order in which the mutation is being visited (see the documentation of ChangeVisitor), * remembers a bunch of state based on whatever was visited until now (e.g. was there a static row update? * Was there a clustered row update? Was there a clustered row delete? Was there a TTL?) - * and tells the caller to stop on the first occurence of a second timestamp/ttl/type of change. + * and tells the caller to stop on the first occurrence of a second timestamp/ttl/type of change. */ struct should_split_visitor { bool _had_static_row = false; diff --git a/cmake/build_submodule.cmake b/cmake/build_submodule.cmake index 5be044f7d0..dd36c3dfe5 100644 --- a/cmake/build_submodule.cmake +++ b/cmake/build_submodule.cmake @@ -32,7 +32,7 @@ endfunction() macro(dist_submodule name dir pkgs) # defined as a macro, so that we can append the path to the dist tarball to - # specfied "pkgs" + # specified "pkgs" cmake_parse_arguments(parsed_args "NOARCH" "" "" ${ARGN}) if(parsed_args_NOARCH) set(arch "noarch") diff --git a/cmake/mode.common.cmake b/cmake/mode.common.cmake index db81e09c88..c5929bcce0 100644 --- a/cmake/mode.common.cmake +++ b/cmake/mode.common.cmake @@ -142,7 +142,7 @@ if(DEFINED ENV{NIX_CC}) get_padded_dynamic_linker_option(dynamic_linker_option 0) else() # gdb has a SO_NAME_MAX_PATH_SIZE of 512, so limit the path size to - # that. The 512 includes the null at the end, hence the 511 bellow. + # that. The 512 includes the null at the end, hence the 511 below. get_padded_dynamic_linker_option(dynamic_linker_option 511) endif() add_link_options("${dynamic_linker_option}") diff --git a/compaction/compaction.cc b/compaction/compaction.cc index 8dcea0f6d0..13071fe7ec 100644 --- a/compaction/compaction.cc +++ b/compaction/compaction.cc @@ -743,7 +743,7 @@ private: formatted_msg += sst; // Do not actually compact a sstable that is fully expired and can be safely - // dropped without ressurrecting old data. + // dropped without resurrecting old data. if (tombstone_expiration_enabled() && fully_expired.contains(sst)) { log_debug("Fully expired sstable {} will be dropped on compaction completion", sst->get_filename()); continue; diff --git a/compaction/compaction.hh b/compaction/compaction.hh index 5d7b9dffdd..08be0494f3 100644 --- a/compaction/compaction.hh +++ b/compaction/compaction.hh @@ -34,7 +34,7 @@ sstring compaction_name(compaction_type type); // to the compaction_type enum code. compaction_type to_compaction_type(sstring type_name); -// Return a string respresenting the compaction type +// Return a string representing the compaction type // as a verb for logging purposes, e.g. "Compact" or "Cleanup". std::string_view to_string(compaction_type type); diff --git a/compaction/compaction_manager.hh b/compaction/compaction_manager.hh index a8f55a344e..8f95ef810e 100644 --- a/compaction/compaction_manager.hh +++ b/compaction/compaction_manager.hh @@ -254,7 +254,7 @@ private: // Propagate replacement of sstables to all ongoing compaction of a given table void propagate_replacement(compaction::table_state& t, const std::vector& removed, const std::vector& added); - // This constructor is suposed to only be used for testing so lets be more explicit + // This constructor is supposed to only be used for testing so lets be more explicit // about invoking it. Ref #10146 compaction_manager(tasks::task_manager& tm); public: diff --git a/compaction/task_manager_module.cc b/compaction/task_manager_module.cc index 56e771a2b7..25454089e1 100644 --- a/compaction/task_manager_module.cc +++ b/compaction/task_manager_module.cc @@ -222,7 +222,7 @@ future<> run_table_tasks(replica::database& db, std::vector ta std::exception_ptr ex; // While compaction is run on one table, the size of tables may significantly change. - // Thus, they are sorted before each invidual compaction and the smallest table is chosen. + // Thus, they are sorted before each individual compaction and the smallest table is chosen. while (!table_tasks.empty()) { try { if (sort) { @@ -274,7 +274,7 @@ future<> run_keyspace_tasks(replica::database& db, std::vector check_access(query_processor& qp, const service::client_state& state) const = 0; /** - * Perform additional validation required by the statment. - * To be overriden by subclasses if needed. + * Perform additional validation required by the statement. + * To be overridden by subclasses if needed. * * @param state the current client state */ diff --git a/cql3/expr/expr-utils.hh b/cql3/expr/expr-utils.hh index e8674ae159..14f4e17850 100644 --- a/cql3/expr/expr-utils.hh +++ b/cql3/expr/expr-utils.hh @@ -76,7 +76,7 @@ extern bool is_supported_by(const expression&, const secondary_index::index&); extern bool has_supporting_index( const expression&, const secondary_index::secondary_index_manager&, allow_local_index allow_local); -// Looks at each column indivudually and checks whether some index can support restrictions on this single column. +// Looks at each column individually and checks whether some index can support restrictions on this single column. // Expression has to consist only of single column restrictions. extern bool index_supports_some_column( const expression&, @@ -231,7 +231,7 @@ bool has_eq_restriction_on_column(const column_definition& column, const express /// column_value. extern expression replace_column_def(const expression&, const column_definition*); -// Replaces all occurences of token(p1, p2) on the left hand side with the given colum. +// Replaces all occurrences of token(p1, p2) on the left hand side with the given column. // For example this changes token(p1, p2) < token(1, 2) to my_column_name < token(1, 2). // Schema is needed to find out which calls to token() describe the partition token. extern expression replace_partition_token(const expression&, const column_definition*, const schema&); @@ -355,7 +355,7 @@ data_type column_mutation_attribute_type(const column_mutation_attribute& e); // How deep aggregations are nested. e.g. sum(avg(count(col))) == 3 unsigned aggregation_depth(const cql3::expr::expression& e); -// Make sure evey column_value or column_mutation_attribute is nested in exactly `depth` aggregations, by adding +// Make sure every column_value or column_mutation_attribute is nested in exactly `depth` aggregations, by adding // first() calls at the deepest level. e.g. if depth=3, then // // my_agg(sum(x), y) diff --git a/cql3/expr/expression.cc b/cql3/expr/expression.cc index 68e314c369..85cf595c25 100644 --- a/cql3/expr/expression.cc +++ b/cql3/expr/expression.cc @@ -161,7 +161,7 @@ get_value(const subscript& s, const evaluation_inputs& inputs) { // For m[null] return null. // This is different from Cassandra - which treats m[null] // as an invalid request error. But m[null] -> null is more - // consistent with our usual null treatement (e.g., both + // consistent with our usual null treatment (e.g., both // null[2] and null < 2 return null). It will also allow us // to support non-constant subscripts (e.g., m[a]) where "a" // may be null in some rows and non-null in others, and it's @@ -1679,14 +1679,14 @@ cql3::raw_value do_evaluate(const binary_operator& binop, const evaluation_input } // Evaluate a conjunction of elements separated by AND. -// NULL is treated as an "unkown value" - maybe true maybe false. +// NULL is treated as an "unknown value" - maybe true maybe false. // `TRUE AND NULL` evaluates to NULL because it might be true but also might be false. // `FALSE AND NULL` evaluates to FALSE because no matter what value NULL acts as, the result will still be FALSE. // Empty values are not allowed. // // Usually in CQL the rule is that when NULL occurs in an operation the whole expression // becomes NULL, but here we decided to deviate from this behavior. -// Treating NULL as an "unkown value" is the standard SQL way of handing NULLs in conjunctions. +// Treating NULL as an "unknown value" is the standard SQL way of handing NULLs in conjunctions. // It works this way in MySQL and Postgres so we do it this way as well. // // The evaluation short-circuits. Once FALSE is encountered the function returns FALSE diff --git a/cql3/expr/prepare_expr.cc b/cql3/expr/prepare_expr.cc index 2346cf0e3b..eb5c57babe 100644 --- a/cql3/expr/prepare_expr.cc +++ b/cql3/expr/prepare_expr.cc @@ -835,7 +835,7 @@ sql_cast_prepare_expression(const cast& c, data_dictionary::database db, const s throw exceptions::invalid_request_exception(fmt::format("Could not infer type of cast argument {}", c.arg)); } - // cast to the same type should be ommited + // cast to the same type should be omitted if (cast_type == type_of(*prepared_arg)) { return prepared_arg; } @@ -1140,7 +1140,7 @@ try_prepare_expression(const expression& expr, data_dictionary::database db, con constant result = value; if (receiver) { // The receiver might have a different type from the constant, but this is allowed if the types are compatible. - // In such case the type is implictly converted to receiver type. + // In such case the type is implicitly converted to receiver type. result.type = receiver->type; } return result; diff --git a/cql3/expr/restrictions.cc b/cql3/expr/restrictions.cc index 5dce5f4f72..f679c13ed1 100644 --- a/cql3/expr/restrictions.cc +++ b/cql3/expr/restrictions.cc @@ -155,7 +155,7 @@ void preliminary_binop_vaidation_checks(const binary_operator& binop) { // Right now a token() on the LHS means that there's a partition token there. // In the future with relaxed grammar this might no longer be true and this check will have to be revisisted. - // Moving the check after preparation would break tests and cassandra compatability. + // Moving the check after preparation would break tests and cassandra compatibility. if (is_token_function(binop.lhs)) { if (binop.op == oper_t::IN) { throw exceptions::invalid_request_exception("IN cannot be used with the token function"); diff --git a/cql3/functions/aggregate_fcts.cc b/cql3/functions/aggregate_fcts.cc index 7aa27536a8..a482a94be2 100644 --- a/cql3/functions/aggregate_fcts.cc +++ b/cql3/functions/aggregate_fcts.cc @@ -149,7 +149,7 @@ NarrowT narrow(WideT acc) { NarrowT ret = static_cast(acc); // The following check only makes sense when NarrowT and WideT are two - // different integeral types and we want to check that NarrowT isn't too + // different integral types and we want to check that NarrowT isn't too // narrow. Let's avoid the check when they are the same type - it is // useless, and worse - wrong for the floating-point case (issue #13564). if constexpr (!std::is_same::value) { diff --git a/cql3/prepared_statements_cache.hh b/cql3/prepared_statements_cache.hh index d92ccbd15e..49c7ddb278 100644 --- a/cql3/prepared_statements_cache.hh +++ b/cql3/prepared_statements_cache.hh @@ -126,7 +126,7 @@ public: // "Touch" the corresponding cache entry in order to bump up its reference count. void touch(const key_type& key) { - // loading_cache::find() returns a value_ptr object which contructor does the "thouching". + // loading_cache::find() returns a value_ptr object which constructor does the "thouching". _cache.find(key.key()); } diff --git a/cql3/restrictions/statement_restrictions.cc b/cql3/restrictions/statement_restrictions.cc index 9d3eb6e868..6f1e5accee 100644 --- a/cql3/restrictions/statement_restrictions.cc +++ b/cql3/restrictions/statement_restrictions.cc @@ -622,7 +622,7 @@ std::vector statement_restrictions::get_column_defs_fo void statement_restrictions::add_restriction(const expr::binary_operator& restr, schema_ptr schema, bool allow_filtering, bool for_view) { if (restr.op == expr::oper_t::IS_NOT) { - // Handle IS NOT NULL restrictions seperately + // Handle IS NOT NULL restrictions separately add_is_not_restriction(restr, schema, for_view); } else if (expr::is_multi_column(restr)) { // Multi column restrictions are only allowed on clustering columns @@ -791,10 +791,10 @@ void statement_restrictions::add_single_column_nonprimary_key_restriction(const } void statement_restrictions::process_partition_key_restrictions(bool for_view, bool allow_filtering) { - // If there is a queriable index, no special condition are required on the other restrictions. + // If there is a queryable index, no special condition are required on the other restrictions. // But we still need to know 2 things: - // - If we don't have a queriable index, is the query ok - // - Is it queriable without 2ndary index, which is always more efficient + // - If we don't have a queryable index, is the query ok + // - Is it queryable without 2ndary index, which is always more efficient // If a component of the partition key is restricted by a relation, all preceding // components must have a EQ. Only the last partition key component can be in IN relation. if (has_token_restrictions()) { @@ -904,7 +904,7 @@ bool statement_restrictions::multi_column_clustering_restrictions_are_supported_ return supported_column != nullptr; } - // Otherwise it has to be a singe binary operator with EQ or IN. + // Otherwise it has to be a single binary operator with EQ or IN. // This is checked earlier during add_restriction. const expr::binary_operator* single_binop = expr::as_if(&_clustering_columns_restrictions); diff --git a/cql3/restrictions/statement_restrictions.hh b/cql3/restrictions/statement_restrictions.hh index 65dcbcc4cb..49634d758a 100644 --- a/cql3/restrictions/statement_restrictions.hh +++ b/cql3/restrictions/statement_restrictions.hh @@ -99,7 +99,7 @@ private: /// Recall that the index-table CK is (token, PK, CK) of the base table for a global index and (indexed column, /// CK) for a local index. /// - /// Elements are conjuctions of single-column binary operators with the same LHS. + /// Elements are conjunctions of single-column binary operators with the same LHS. /// Element order follows the indexing-table clustering key. /// In case of a global index the first element's (token restriction) RHS is a dummy value, it is filled later. std::optional> _idx_tbl_ck_prefix; diff --git a/cql3/selection/selection.hh b/cql3/selection/selection.hh index 8cf828dab0..c3563447cf 100644 --- a/cql3/selection/selection.hh +++ b/cql3/selection/selection.hh @@ -79,7 +79,7 @@ protected: virtual ~selection() {} public: - // Overriden by SimpleSelection when appropriate. + // Overridden by SimpleSelection when appropriate. virtual bool is_wildcard() const { return false; } diff --git a/cql3/statements/cf_prop_defs.cc b/cql3/statements/cf_prop_defs.cc index 174c7eb01e..8222677523 100644 --- a/cql3/statements/cf_prop_defs.cc +++ b/cql3/statements/cf_prop_defs.cc @@ -71,7 +71,7 @@ schema::extensions_map cf_prop_defs::make_schema_extensions(const db::extensions } void cf_prop_defs::validate(const data_dictionary::database db, sstring ks_name, const schema::extensions_map& schema_extensions) const { - // Skip validation if the comapction strategy class is already set as it means we've alreayd + // Skip validation if the comapction strategy class is already set as it means we've already // prepared (and redoing it would set strategyClass back to null, which we don't want) if (_compaction_strategy_class) { return; diff --git a/cql3/statements/cf_statement.cc b/cql3/statements/cf_statement.cc index c496a1a19d..62387e5b3e 100644 --- a/cql3/statements/cf_statement.cc +++ b/cql3/statements/cf_statement.cc @@ -26,8 +26,8 @@ cf_statement::cf_statement(std::optional cf_name) void cf_statement::prepare_keyspace(const service::client_state& state) { if (!_cf_name->has_keyspace()) { - // XXX: We explicitely only want to call state.getKeyspace() in this case, as we don't want to throw - // if not logged in any keyspace but a keyspace is explicitely set on the statement. So don't move + // XXX: We explicitly only want to call state.getKeyspace() in this case, as we don't want to throw + // if not logged in any keyspace but a keyspace is explicitly set on the statement. So don't move // the call outside the 'if' or replace the method by 'prepareKeyspace(state.getKeyspace())' _cf_name->set_keyspace(state.get_keyspace(), true); } diff --git a/cql3/statements/describe_statement.cc b/cql3/statements/describe_statement.cc index 906f8fc6d7..cef66ee52a 100644 --- a/cql3/statements/describe_statement.cc +++ b/cql3/statements/describe_statement.cc @@ -70,14 +70,14 @@ struct description { sstring _name; std::optional _create_statement; - // Descritpion without create_statement + // Description without create_statement description(replica::database& db, const keyspace_element& element) : _keyspace(util::maybe_quote(element.keypace_name())) , _type(element.element_type(db)) , _name(util::maybe_quote(element.element_name())) , _create_statement(std::nullopt) {} - // Descritpion with create_statement + // Description with create_statement description(replica::database& db, const keyspace_element& element, bool with_internals) : _keyspace(util::maybe_quote(element.keypace_name())) , _type(element.element_type(db)) diff --git a/cql3/statements/drop_type_statement.cc b/cql3/statements/drop_type_statement.cc index 51ecb0a647..793c13d036 100644 --- a/cql3/statements/drop_type_statement.cc +++ b/cql3/statements/drop_type_statement.cc @@ -79,7 +79,7 @@ void drop_type_statement::validate_while_executing(query_processor& qp) const { // yet apply the drop mutations after -> inconsistent data! // This problem is the same in origin, and I see no good way around it // as long as the atomicity of schema modifications are based on - // actual appy of mutations, because unlike other drops, this one isn't + // actual apply of mutations, because unlike other drops, this one isn't // benevolent. // I guess this is one case where user need beware, and don't mess with types // concurrently! diff --git a/cql3/statements/ks_prop_defs.cc b/cql3/statements/ks_prop_defs.cc index fbb5bf3984..0739f7a9f8 100644 --- a/cql3/statements/ks_prop_defs.cc +++ b/cql3/statements/ks_prop_defs.cc @@ -70,7 +70,7 @@ static std::map prepare_options( } void ks_prop_defs::validate() { - // Skip validation if the strategy class is already set as it means we've alreayd + // Skip validation if the strategy class is already set as it means we've already // prepared (and redoing it would set strategyClass back to null, which we don't want) if (_strategy_class) { return; diff --git a/cql3/statements/modification_statement.hh b/cql3/statements/modification_statement.hh index 84240bc12f..0b5fade50b 100644 --- a/cql3/statements/modification_statement.hh +++ b/cql3/statements/modification_statement.hh @@ -173,7 +173,7 @@ public: private: // Return true if this statement doesn't update or read any regular rows, only static rows. - // Note, it isn't enought to just check !_sets_regular_columns && _regular_conditions.empty(), + // Note, it isn't enough to just check !_sets_regular_columns && _regular_conditions.empty(), // because a DELETE statement that deletes whole rows (DELETE FROM ...) technically doesn't // have any column operations and hence doesn't have _sets_regular_columns set. It doesn't // have _sets_static_columns set either so checking the latter flag too here guarantees that diff --git a/cql3/statements/select_statement.cc b/cql3/statements/select_statement.cc index dfc40d6b3c..ed9eccb056 100644 --- a/cql3/statements/select_statement.cc +++ b/cql3/statements/select_statement.cc @@ -667,9 +667,9 @@ indexed_table_select_statement::do_execute_base_query( // // This means that we should not set a open_ended_both_sides // clustering range on base_pk, instead intersect it with - // _row_ranges (which contains the restrictions neccessary for the + // _row_ranges (which contains the restrictions necessary for the // case described above). The result of such intersection is just - // _row_ranges, which we explicity set on base_pk. + // _row_ranges, which we explicitly set on base_pk. command->slice.set_range(*_schema, base_pk, row_ranges); } } @@ -2179,7 +2179,7 @@ select_statement::prepared_orderings_type select_statement::prepare_orderings(co prepared_orderings.emplace_back(def, column_ordering); } - // Uncomment this to allow specifing ORDER BY columns in any order. + // Uncomment this to allow specifying ORDER BY columns in any order. // Right now specifying ORDER BY (c2 asc, c1 asc) is illegal, it can only be ORDER BY (c1 asc, c2 asc). // // std::sort(prepared_orderings.begin(), prepared_orderings.end(), diff --git a/cql3/type_json.cc b/cql3/type_json.cc index 2c65dfb15f..0018ed3fea 100644 --- a/cql3/type_json.cc +++ b/cql3/type_json.cc @@ -94,7 +94,7 @@ template static T to_int(const rjson::value& value) { } return u64_result; } else if (value.IsDouble()) { - // We allow specifing integer constants + // We allow specifying integer constants // using scientific notation (for example 1.3e8) // and floating-point numbers ending with .0 (for example 12.0), // but not floating-point numbers with fractional part (12.34). diff --git a/db/commitlog/commitlog.cc b/db/commitlog/commitlog.cc index 5c8b99d665..507d12ba6a 100644 --- a/db/commitlog/commitlog.cc +++ b/db/commitlog/commitlog.cc @@ -204,7 +204,7 @@ struct db::commitlog::entry_writer { * Should return the total, exact, size for all entries + overhead (i.e. schema) * for this segment. * - * Can be called more than once, if segment switch is neccesary (because race) + * Can be called more than once, if segment switch is necessary (because race) */ virtual size_t size(segment&) = 0; /** @@ -627,7 +627,7 @@ std::enable_if_t::value, T> read(Input& in) { /* * A single commit log file on disk. Manages creation of the file and writing mutations to disk, * as well as tracking the last mutation position of any "dirty" CFs covered by the segment file. Segment - * files are initially allocated to a fixed size and can grow to accomidate a larger value if necessary. + * files are initially allocated to a fixed size and can grow to accommodate a larger value if necessary. * * The IO flow is somewhat convoluted and goes something like this: * @@ -654,7 +654,7 @@ std::enable_if_t::value, T> read(Input& in) { * Note that we do not care which order segment chunks finish writing * to disk, other than all below a flush point must finish before flushing. * - * We currently do not wait for flushes to finish before issueing the next + * We currently do not wait for flushes to finish before issuing the next * cycle call ("after" flush point in the file). This might not be optimal. * * To close and finish a segment, we first close the gate object that guards @@ -1108,7 +1108,7 @@ public: } catch (...) { // If we get an IO exception (which we assume this is) // we should close the segment. - // TODO: should we also trunctate away any partial write + // TODO: should we also truncate away any partial write // we did? me->_closed = true; // just mark segment as closed, no writes will be done. throw; @@ -2216,7 +2216,7 @@ future<> db::commitlog::segment_manager::do_pending_deletes() { } // #8376 - if we had an error in recycling (disk rename?), and no elements - // are available, we could have waiters hoping they will get segements. + // are available, we could have waiters hoping they will get segments. // abort the queue (wakes up any existing waiters - futures), and let them // retry. Since we did deletions instead, disk footprint should allow // for new allocs at least. Or more likely, everything is broken, but diff --git a/db/commitlog/commitlog.hh b/db/commitlog/commitlog.hh index e62b0e06f6..d16c047d76 100644 --- a/db/commitlog/commitlog.hh +++ b/db/commitlog/commitlog.hh @@ -65,7 +65,7 @@ class extensions; * Code should ensure to use discard_completed_segments with UUID + * highest rp once a memtable has been flushed. This will allow * discarding used segments. Failure to do so will keep stuff - * indefinately. + * indefinitely. */ class commitlog { public: @@ -186,7 +186,7 @@ public: /** * Template version of add. * Resolves with timed_out_error when timeout is reached. - * @param mu an invokable op that generates the serialized data. (Of size bytes) + * @param mu an invocable op that generates the serialized data. (Of size bytes) */ template future add_mutation(const cf_id_type& id, size_t size, db::timeout_clock::time_point timeout, force_sync sync, MutationOp&& mu) { @@ -197,7 +197,7 @@ public: /** * Template version of add. - * @param mu an invokable op that generates the serialized data. (Of size bytes) + * @param mu an invocable op that generates the serialized data. (Of size bytes) */ template future add_mutation(const cf_id_type& id, size_t size, force_sync sync, MutationOp&& mu) { diff --git a/db/consistency_level.cc b/db/consistency_level.cc index 6fb4dd90e4..03b330c284 100644 --- a/db/consistency_level.cc +++ b/db/consistency_level.cc @@ -218,7 +218,7 @@ void assure_sufficient_live_nodes( if (assure_sufficient_live_nodes_each_quorum(cl, erm, live_endpoints, pending_endpoints)) { break; } - // Fallthough on purpose for SimpleStrategy + // Fallthrough on purpose for SimpleStrategy [[fallthrough]]; default: size_t live = live_endpoints.size(); @@ -300,7 +300,7 @@ filter_for_query(consistency_level cl, // are 0.01 and 0.02, so equalizing the miss numbers will send // the first node twice the requests. But unless the disk is // extremely slow, at such high hit ratios the disk work is - // negligable and we want these two nodes to get equal work. + // negligible and we want these two nodes to get equal work. // 2. Even if one node has perfect cache hit ratio (near 1.0), // and the other near 0, we want the near-0 node to get some // of the work to warm up its cache. When max_hit_rate=0.95 @@ -378,7 +378,7 @@ is_sufficient_live_nodes(consistency_level cl, } } [[fallthrough]]; - // Fallthough on purpose for SimpleStrategy + // Fallthrough on purpose for SimpleStrategy default: return live_endpoints.size() >= block_for(erm, cl); } diff --git a/db/functions/aggregate_function.hh b/db/functions/aggregate_function.hh index 430501c108..d1629b1b62 100644 --- a/db/functions/aggregate_function.hh +++ b/db/functions/aggregate_function.hh @@ -39,7 +39,7 @@ public: const stateless_aggregate_function& get_aggregate() const; /** - * Checks wheather the function can be distributed and is able to reduce states. + * Checks whether the function can be distributed and is able to reduce states. * * @return true if the function is reducible, false otherwise. */ diff --git a/db/heat_load_balance.cc b/db/heat_load_balance.cc index 71d978a65e..c3b60234d0 100644 --- a/db/heat_load_balance.cc +++ b/db/heat_load_balance.cc @@ -44,7 +44,7 @@ rand_float() { // This implementation has complexity O(N). If we plan to call randone() // many times on the same probability vector, and if N can grow large, // we should consider a different implementation, known as "The Alias Method", -// which has O(N) preperation stage but then only O(1) for each call. +// which has O(N) preparation stage but then only O(1) for each call. // The alias method was first suggested by A.J. Walker in 1977 and later // refined by Knuth and others. Here is a short overview of this method: // The O(N) implementation of randone() divides the interval [0,1) into @@ -100,21 +100,21 @@ randone(const std::vector& p, float rnd = rand_float()) { // than 1/K: even if we return item i in *every* K-combination, item i will // still be only 1/K of the produced items. To reach p[i] > 1/K will mean // some combinations will need to contain more than one copy of i - which -// contradicts the defintion of a "combination". +// contradicts the definition of a "combination". // // Though ssample() is required to fulfill the first-order inclusion // probabilities p (the probability of each item appearing in the returned // combination), it is NOT required to make any guarantees on the high-order -// inclusion probabilities, i.e., the probablities for pairs of items to +// inclusion probabilities, i.e., the probabilities for pairs of items to // be returned together in the same combination. This greatly simplifies // the implementation, and means we can use the "Systematic Sampling" // technique (explained below) which only makes guarantees on the first-order -// inclusion probablities. In our use case, fulfilling *only* the 1st order +// inclusion probabilities. In our use case, fulfilling *only* the 1st order // inclusion probabilities is indeed enough: We want that each node gets a // given amount of work, but don't care if the different K nodes we choose // in one request are correlated. // -// Not making any guarantees on high-order inclusion probablities basically +// Not making any guarantees on high-order inclusion probabilities basically // means that the items are not independent. To understand what this means, // consider a simple example: say we have N=4 items with equal probability // and want to draw random pairs (K=2). Our implementation will return {0,1} @@ -138,16 +138,16 @@ randone(const std::vector& p, float rnd = rand_float()) { // 2. The probability to choose each item is exactly p_i*K. // // ssample() only calls for one random number generation (this is important -// for performance) but calls randone() on the same probablity vector K times, +// for performance) but calls randone() on the same probability vector K times, // which makes it even more interesting to implement the Alias Method // described above. However, for very small N like 3, the difference is not -// likely to be noticable. +// likely to be noticeable. // // TODO: For the special case of K == N-1, we can have a slightly more // efficient implementation, which calculates the probability for each of // the N combinations (the combination lacking item i can be proven to have -// probablity 1 - K*p[i]) and then uses one randone() call with these -// modified probablities. +// probability 1 - K*p[i]) and then uses one randone() call with these +// modified probabilities. // TODO: Consider making this a template of K, N and have specialized // implementations for low N (e.g., 3), K=N-1, etc. // TODO: write to a pre-allocated return vector to avoid extra allocation. @@ -187,7 +187,7 @@ miss_equalizing_probablities(const std::vector& hit_rates) { return ret; } -// Given a set of desired probablities with sum 1, clip the probablities +// Given a set of desired probabilities with sum 1, clip the probabilities // to be not higher than the given limit. The rest of the probabilities are // increased, in an attempt to preserve the ratios between probabilities, // if possible - but keep all the probabilities below the limit. @@ -286,7 +286,7 @@ redistribute(const std::vector& p, unsigned me, unsigned k) { // min(deficit[me], mixed_surplus). // TODO: use NlgN sort instead of this ridiculous N^2 implementation. // TODO: can we do this without a NlgN (although very small N, not even - // the full rf)? Note also the distribution code below is N^2 anway + // the full rf)? Note also the distribution code below is N^2 anyway // (two nested for loops). std::list> sorted_deficits; for (unsigned i = 0; i < rf; i++) { @@ -393,7 +393,7 @@ redistribute(const std::vector& p, unsigned me, unsigned k) { // other nodes. Here we need to handle the opposite side - me is // one of the nodes which sent too much to other nodes and needs // to send to the mixed node instead. - // TODO: find a more efficient way to check if the alorithm will + // TODO: find a more efficient way to check if the algorithm will // end with just one mixed node and its surplus :-( unsigned n_converted_to_deficit = 0; unsigned mix_i = 0; // only used if n_converted_to_deficit==1 diff --git a/db/heat_load_balance.hh b/db/heat_load_balance.hh index 2bd2ba055a..4f0e693105 100644 --- a/db/heat_load_balance.hh +++ b/db/heat_load_balance.hh @@ -77,7 +77,7 @@ public: if (_extra) { // Choose one of the remaining n-k nodes as the extra (k+1)th // returned node. Currently, we choose the nodes with equal - // probablities. We could have also used _pp or the original p + // probabilities. We could have also used _pp or the original p // for this - I don't know which is better, if it even matters. std::vector used(n); for (int i : r) { @@ -115,7 +115,7 @@ miss_equalizing_combination( } auto p = miss_equalizing_probablities(hit_rates); // When we'll ask for combinations of "bf" different nodes, probabilities - // higher than 1/bf cannot be achieved (1/bf itsef can be achieved by + // higher than 1/bf cannot be achieved (1/bf itself can be achieved by // returning this node in every returned combination). So no matter what // we do, we can't actually achieve the desired probabilities. Let's // try for the best we can @@ -125,7 +125,7 @@ miss_equalizing_combination( hr_logger.trace("desired probabilities: {}, {}", node_hit_rate | boost::adaptors::map_keys, p); // If me >= rf, this node is NOT one of the replicas, and we just need - // to use the probabilties for these replicas, without doing the + // to use the probabilities for these replicas, without doing the // redistribution to prefer the local replica. if (me < rf) { p = redistribute(p, me, bf); diff --git a/db/hints/internal/hint_endpoint_manager.hh b/db/hints/internal/hint_endpoint_manager.hh index f47dc3b503..8d2ba641e7 100644 --- a/db/hints/internal/hint_endpoint_manager.hh +++ b/db/hints/internal/hint_endpoint_manager.hh @@ -200,4 +200,4 @@ private: }; } // namespace internal -} // namesapce db::hints +} // namespace db::hints diff --git a/db/hints/internal/hint_sender.hh b/db/hints/internal/hint_sender.hh index ef94568ace..da3db82196 100644 --- a/db/hints/internal/hint_sender.hh +++ b/db/hints/internal/hint_sender.hh @@ -233,7 +233,7 @@ private: /// \return const column_mapping& get_column_mapping(lw_shared_ptr ctx_ptr, const frozen_mutation& fm, const hint_entry_reader& hr); - /// \brief Perform a single mutation send atempt. + /// \brief Perform a single mutation send attempt. /// /// If the original destination end point is still a replica for the given mutation - send the mutation directly /// to it, otherwise execute the mutation "from scratch" with CL=ALL. diff --git a/db/hints/manager.hh b/db/hints/manager.hh index 545eda602a..3df58d2513 100644 --- a/db/hints/manager.hh +++ b/db/hints/manager.hh @@ -165,10 +165,10 @@ public: /// and which storing is not complete yet. This is meant to stabilize the memory consumption of the hints storing path /// which is initialed from the storage_proxy WRITE flow. storage_proxy is going to check this condition and if it /// returns TRUE it won't attempt any new WRITEs thus eliminating the possibility of new hints generation. If new hints - /// are not generated the amount of in-flight hints amount and thus the memory they are consuming is going to drop eventualy + /// are not generated the amount of in-flight hints amount and thus the memory they are consuming is going to drop eventually /// because the hints are going to be either stored or dropped. After that the things are going to get back to normal again. /// - /// Note that we can't consider the disk usage consumption here because the disk usage is not promissed to drop down shortly + /// Note that we can't consider the disk usage consumption here because the disk usage is not promised to drop down shortly /// because it requires the remote node to be UP. /// /// \param ep end point to check diff --git a/db/hints/sync_point.cc b/db/hints/sync_point.cc index 9f9356b7de..93e1765e54 100644 --- a/db/hints/sync_point.cc +++ b/db/hints/sync_point.cc @@ -41,7 +41,7 @@ namespace hints { // per_manager_sync_point_v1 mv_sp - replay positions for materialized view hint queues // // per_manager_sync_point_v1: -// std::vector addresses - adresses for which this sync point defines replay positions +// std::vector addresses - addresses for which this sync point defines replay positions // std::vector flattened_rps: // A flattened collection of replay positions for all addresses and shards. // Replay positions are grouped by address, in the same order as in diff --git a/db/legacy_schema_migrator.cc b/db/legacy_schema_migrator.cc index 12c94794d6..fcc8804455 100644 --- a/db/legacy_schema_migrator.cc +++ b/db/legacy_schema_migrator.cc @@ -56,7 +56,7 @@ public: typedef db_clock::time_point time_point; - // TODO: we dont't support triggers. + // TODO: we don't support triggers. // this is a placeholder. struct trigger { time_point timestamp; @@ -448,7 +448,7 @@ public: // TODO: Unfortunately there is not a single REGULAR column in system.schema_usertypes, so annoyingly we cannot // use the writeTime() CQL function, and must resort to a lower level. // Origin digs up the actual cells of target partition and gets timestamp from there. - // We should do the same, but g-dam thats messy. Lets give back dung value for now. + // We should do the same, but g-dam that's messy. Lets give back dung value for now. return make_ready_future(dst.timestamp); } diff --git a/db/schema_features.hh b/db/schema_features.hh index 0c48ad260d..2ca4fd768e 100644 --- a/db/schema_features.hh +++ b/db/schema_features.hh @@ -15,7 +15,7 @@ namespace db { enum class schema_feature { VIEW_VIRTUAL_COLUMNS, - // When set, the schema digest is calcualted in a way such that it doesn't change after all + // When set, the schema digest is calculated in a way such that it doesn't change after all // tombstones in an empty partition expire. // See https://github.com/scylladb/scylla/issues/4485 DIGEST_INSENSITIVE_TO_EXPIRY, diff --git a/db/schema_tables.cc b/db/schema_tables.cc index 20c4847ece..6a09253fac 100644 --- a/db/schema_tables.cc +++ b/db/schema_tables.cc @@ -1460,7 +1460,7 @@ static future<> merge_tables_and_views(distributed& prox // If we don't do it we are leaving a window where write commands to this schema are illegal. // There are 3 possibilities: // 1. The table was altered - in this case we want the view to correspond to this new table schema. - // 2. The table was just created - the table is guarantied to be published with the view in that case. + // 2. The table was just created - the table is guaranteed to be published with the view in that case. // 3. The view itself was altered - in that case we already know the base table so we can take it from // the database object. view_ptr vp = create_view_from_mutations(proxy, std::move(sm)); @@ -1519,7 +1519,7 @@ static future<> merge_tables_and_views(distributed& prox co_await db.invoke_on_all([&] (replica::database& db) -> future<> { // In order to avoid possible races we first create the tables and only then the views. - // That way if a view seeks information about its base table it's guarantied to find it. + // That way if a view seeks information about its base table it's guaranteed to find it. co_await max_concurrent_for_each(tables_diff.created, max_concurrent, [&] (global_schema_ptr& gs) -> future<> { co_await db.add_column_family_and_make_directory(gs, replica::database::is_new_cf::yes); }); diff --git a/db/system_keyspace.cc b/db/system_keyspace.cc index e71492bf96..d5943af6a2 100644 --- a/db/system_keyspace.cc +++ b/db/system_keyspace.cc @@ -1906,7 +1906,7 @@ std::vector system_keyspace::all_tables(const db::config& cfg) { } // legacy schema r.insert(r.end(), { - // TODO: once we migrate hints/batchlog and add convertor + // TODO: once we migrate hints/batchlog and add converter // legacy::hints(), legacy::batchlog(), legacy::keyspaces(), legacy::column_families(), legacy::columns(), legacy::triggers(), legacy::usertypes(), @@ -2228,7 +2228,7 @@ future system_keyspace::load_paxos_state(partition_ std::optional most_recent; if (row.has("most_recent_commit_at")) { - // the value can be missing if it was pruned, suply empty one since + // the value can be missing if it was pruned, supply empty one since // it will not going to be used anyway auto fm = row.has("most_recent_commit") ? ser::deserialize_from_buffer<>(row.get_blob("most_recent_commit"), boost::type(), 0) : @@ -2539,7 +2539,7 @@ future system_keyspace::load_topology_state() { ret.req_param.emplace(host_id, service::rebuild_param{*rebuild_option}); break; case service::node_state::left_token_ring: - // If replacenode fails the bootstraping node is moved to left_token_ring state where it executes the metadata + // If replacenode fails the bootstrapping node is moved to left_token_ring state where it executes the metadata // barrier. It needs to know which nodes to ignore during the barrier, so put them here into the replace_param. // Note that if the replacenode does not fail and later the node is decommissioned it will move to the left_token_ring // state at some point and replace_param will be created here as well (we do not remove replaced_id, and ignored_ids diff --git a/db/view/view.cc b/db/view/view.cc index 2d890145ba..9a334ab310 100644 --- a/db/view/view.cc +++ b/db/view/view.cc @@ -212,7 +212,7 @@ db::view::base_info_ptr view_info::make_base_dependent_view_info(const schema& b // If we didn't find the column in the base column then it must have been deleted // or not yet added (by alter command), this means it is for sure not a pk column // in the base table. This can happen if the version of the base schema is not the - // one that the view was created with. Seting this schema as the base can't harm since + // one that the view was created with. Setting this schema as the base can't harm since // if we got to such a situation then it means it is only going to be used for reading // (computation of shadowable tombstones) and in that case the existence of such a column // is the only thing that is of interest to us. @@ -289,7 +289,7 @@ bool partition_key_matches(data_dictionary::database db, const schema& base, con uint64_t zero = 0; auto dummy_row = query::result_row_view(ser::qr_row_view{simple_memory_input_stream(reinterpret_cast(&zero), 8)}); auto dummy_options = cql3::query_options({ }); - // FIXME: pass nullptrs for some of theses dummies + // FIXME: pass nullptrs for some of these dummies return cql3::expr::is_satisfied_by( pk_restrictions, cql3::expr::evaluation_inputs{ @@ -313,7 +313,7 @@ bool clustering_prefix_matches(data_dictionary::database db, const schema& base, auto selection = cql3::selection::selection::for_columns(base.shared_from_this(), ck_columns); uint64_t zero = 0; auto dummy_options = cql3::query_options({ }); - // FIXME: pass nullptrs for some of theses dummies + // FIXME: pass nullptrs for some of dummies return cql3::expr::is_satisfied_by( r, cql3::expr::evaluation_inputs{ @@ -1664,7 +1664,7 @@ future<> view_update_generator::mutate_MV( } } } - // It's still possible that a target endpoint is dupliated in the remote endpoints list, + // It's still possible that a target endpoint is duplicated in the remote endpoints list, // so let's get rid of the duplicate if it exists if (target_endpoint) { auto remote_it = std::find(remote_endpoints.begin(), remote_endpoints.end(), *target_endpoint); diff --git a/db/view/view_update_generator.cc b/db/view/view_update_generator.cc index e8c0e20eec..76b705424d 100644 --- a/db/view/view_update_generator.cc +++ b/db/view/view_update_generator.cc @@ -296,7 +296,7 @@ void view_update_generator::discover_staging_sstables() { _progress_tracker->on_sstable_registration(sst); _sstables_with_tables[t].push_back(std::move(sst)); // we're at early stage here, no need to kick _pending_sstables (the - // bulding fiber is not running), neither we can wait on the semaphore + // building fiber is not running), neither we can wait on the semaphore _registration_sem.consume(1); } } diff --git a/dht/murmur3_partitioner.cc b/dht/murmur3_partitioner.cc index 2865303806..6df1585034 100644 --- a/dht/murmur3_partitioner.cc +++ b/dht/murmur3_partitioner.cc @@ -21,7 +21,7 @@ namespace dht { // allowed anyway. However, they *are* allowed in materialized views, so the // empty-key partition should get a real token, not an invalid token, so // we dropped this special case. Since we don't support migrating sstables of -// materialized-views from Cassandra, this Cassandra-Scylla incompatiblity +// materialized-views from Cassandra, this Cassandra-Scylla incompatibility // will not cause problems in practice. // Note that get_token(const schema& s, partition_key_view key) below must // use exactly the same algorithm as this function. diff --git a/dist/common/scripts/scylla_coredump_setup b/dist/common/scripts/scylla_coredump_setup index 9d8f922628..d4bbd336cb 100755 --- a/dist/common/scripts/scylla_coredump_setup +++ b/dist/common/scripts/scylla_coredump_setup @@ -128,7 +128,7 @@ WantedBy=local-fs.target scylla-server.service # Not just available/unavailable, it describe more: # - Storage: none # - Storage: journal - # - Storage: /path/to/file (inacessible) + # - Storage: /path/to/file (inaccessible) # - Storage: /path/to/file # # After systemd-v248, available coredump file output changed like this: diff --git a/dist/offline_installer/debian/build_offline_installer.sh b/dist/offline_installer/debian/build_offline_installer.sh index c94a968f50..d6926dc0b9 100755 --- a/dist/offline_installer/debian/build_offline_installer.sh +++ b/dist/offline_installer/debian/build_offline_installer.sh @@ -103,7 +103,7 @@ deb-src http://security.debian.org/ $SUITE/updates main contrib non-free EOS fi sudo wget -P build/chroot/etc/apt/sources.list.d $REPO -# Avoid the pacakges to be deleted after installation +# Avoid the packages to be deleted after installation sudo tee build/chroot/etc/apt/apt.conf.d/01keep-debs << EOS Binary::apt::APT::Keep-Downloaded-Packages "true"; EOS diff --git a/dist/redhat/scylla.spec b/dist/redhat/scylla.spec index e019415bfc..26733e6df9 100644 --- a/dist/redhat/scylla.spec +++ b/dist/redhat/scylla.spec @@ -253,4 +253,4 @@ fi %changelog * Tue Jul 21 2015 Takuya ASADA -- inital version of scylla.spec +- initial version of scylla.spec diff --git a/gms/feature_service.hh b/gms/feature_service.hh index 25470d2eb9..8c492ff6d2 100644 --- a/gms/feature_service.hh +++ b/gms/feature_service.hh @@ -108,7 +108,7 @@ public: // bigger than this hard_limit. To clean things up, we introduced the third // field into max_result_size. It's name is page_size. Now page_size always // means the size of the page while soft and hard limits are just what their - // names suggest. They are no longer interepreted as page size. This is not + // names suggest. They are no longer interpreted as page size. This is not // a backwards compatible change so this new cluster feature is used to make // sure the whole cluster supports the new page_size field and we can safely // send it to replicas. diff --git a/gms/gossiper.cc b/gms/gossiper.cc index 1940f66bf1..7984dcff31 100644 --- a/gms/gossiper.cc +++ b/gms/gossiper.cc @@ -190,7 +190,7 @@ future<> gossiper::handle_syn_msg(msg_addr from, gossip_digest_syn syn_msg) { syn_msg_pending& p = _syn_handlers[from.addr]; if (p.pending) { - // The latest syn message from peer has the latest infomation, so + // The latest syn message from peer has the latest information, so // it is safe to drop the previous syn message and keep the latest // one only. logger.debug("Queue gossip syn msg from node {}, syn_msg={}", from, syn_msg); @@ -307,7 +307,7 @@ future<> gossiper::handle_ack_msg(msg_addr id, gossip_digest_ack ack_msg) { } ack_msg_pending& p = _ack_handlers[from.addr]; if (p.pending) { - // The latest ack message digests from peer has the latest infomation, so + // The latest ack message digests from peer has the latest information, so // it is safe to drop the previous ack message digests and keep the latest // one only. logger.debug("Queue gossip ack msg digests from node {}, ack_msg_digest={}", from, ack_msg_digest); @@ -365,7 +365,7 @@ future<> gossiper::do_send_ack2_msg(msg_addr from, utils::chunked_vectorget_heart_beat_state().get_generation() > g_digest.get_generation() ? version_type(0) : g_digest.get_max_version(); @@ -1858,7 +1858,7 @@ future<> gossiper::do_on_dead_notifications(inet_address addr, endpoint_state_pt void gossiper::request_all(gossip_digest& g_digest, utils::chunked_vector& delta_gossip_digest_list, generation_type remote_generation) const { - /* We are here since we have no data for this endpoint locally so request everthing. */ + /* We are here since we have no data for this endpoint locally so request everything. */ delta_gossip_digest_list.emplace_back(g_digest.get_endpoint(), remote_generation); logger.trace("request_all for {}", g_digest.get_endpoint()); } @@ -2128,7 +2128,7 @@ future<> gossiper::add_local_application_state(std::initializer_list gossiper::add_local_application_state(std::list> states) { if (states.empty()) { diff --git a/gms/gossiper.hh b/gms/gossiper.hh index 669520b4b2..2903167270 100644 --- a/gms/gossiper.hh +++ b/gms/gossiper.hh @@ -204,7 +204,7 @@ public: static constexpr std::chrono::milliseconds GOSSIP_SETTLE_MIN_WAIT_MS{5000}; - // Maximimum difference between remote generation value and generation + // Maximum difference between remote generation value and generation // value this node would get if this node were restarted that we are // willing to accept about a peer. static constexpr generation_type::value_type MAX_GENERATION_DIFFERENCE = 86400 * 365; diff --git a/gms/i_endpoint_state_change_subscriber.hh b/gms/i_endpoint_state_change_subscriber.hh index 2168dd8646..c8eafd4ebb 100644 --- a/gms/i_endpoint_state_change_subscriber.hh +++ b/gms/i_endpoint_state_change_subscriber.hh @@ -25,7 +25,7 @@ namespace gms { * instance to decide what he does with this change. Not all modules maybe interested * in all state changes. * - * All notificaions that accept a permit_id are guaranteed to be called + * All notifications that accept a permit_id are guaranteed to be called * under the respective endpoint lock. The permit_id must be provided * by the subscriber if it calls back gossiper functions that modify the same endpoint's * state, and therefore may acquire the same endpoint_lock - to prevent deadlock on the nested diff --git a/gms/inet_address.hh b/gms/inet_address.hh index c92b2eb60c..d915391e55 100644 --- a/gms/inet_address.hh +++ b/gms/inet_address.hh @@ -93,7 +93,7 @@ struct fmt::formatter : fmt::formatter { if (x.addr().is_ipv4()) { return fmt::format_to(ctx.out(), "{}", x.addr()); } - // print 2 bytes in a group, and use ':' as the delimeter + // print 2 bytes in a group, and use ':' as the delimiter fmt::format_to(ctx.out(), "{:2:}", fmt_hex(x.bytes())); if (x.addr().scope() != seastar::net::inet_address::invalid_scope) { return fmt::format_to(ctx.out(), "%{}", x.addr().scope()); diff --git a/index/secondary_index_manager.cc b/index/secondary_index_manager.cc index 9c77c3af40..b363c6352b 100644 --- a/index/secondary_index_manager.cc +++ b/index/secondary_index_manager.cc @@ -261,7 +261,7 @@ view_ptr secondary_index_manager::create_view_for_index(const index_metadata& im if (!im.local()) { // If two cells within the same collection share the same value but not liveness information, then // for the index on the values, the rows generated would share the same primary key and thus the - // liveness information as well. Prevent that by distinguising them in the clustering key. + // liveness information as well. Prevent that by distinguishing them in the clustering key. if (target_type == cql3::statements::index_target::target_type::collection_values) { data_type t = type_for_computed_column(cql3::statements::index_target::target_type::keys, *index_target->type); bytes column_name = get_available_column_name(*schema, "keys_for_values_idx"); diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift index b944908627..6f74b4153d 100644 --- a/interface/cassandra.thrift +++ b/interface/cassandra.thrift @@ -703,7 +703,7 @@ service Cassandra { /** * Atomic compare and set. * - * If the cas is successfull, the success boolean in CASResult will be true and there will be no current_values. + * If the cas is successful, the success boolean in CASResult will be true and there will be no current_values. * Otherwise, success will be false and current_values will contain the current values for the columns in * expected (that, by definition of compare-and-set, will differ from the values in expected). * @@ -845,7 +845,7 @@ service Cassandra { throws (1:InvalidRequestException ire), /** Enables tracing for the next query in this connection and returns the UUID for that trace session - The next query will be traced idependently of trace probability and the returned UUID can be used to query the trace keyspace */ + The next query will be traced independently of trace probability and the returned UUID can be used to query the trace keyspace */ binary trace_next_query(), list describe_splits_ex(1:required string cfName, diff --git a/locator/everywhere_replication_strategy.hh b/locator/everywhere_replication_strategy.hh index 292d3755fd..a3cd8ab134 100644 --- a/locator/everywhere_replication_strategy.hh +++ b/locator/everywhere_replication_strategy.hh @@ -23,7 +23,7 @@ public: virtual void validate_options(const gms::feature_service&) const override { /* noop */ } std::optional> recognized_options(const topology&) const override { - // We explicitely allow all options + // We explicitly allow all options return std::nullopt; } diff --git a/locator/snitch_base.hh b/locator/snitch_base.hh index 4147be65ef..365ef07902 100644 --- a/locator/snitch_base.hh +++ b/locator/snitch_base.hh @@ -134,7 +134,7 @@ public: return snitch_signal_connection_t(); } - // tells wheter the INTERNAL_IP address should be preferred over endpoint address + // tells whether the INTERNAL_IP address should be preferred over endpoint address virtual bool prefer_local() const noexcept { return false; } diff --git a/message/messaging_service.cc b/message/messaging_service.cc index 9c03533611..7f78b12403 100644 --- a/message/messaging_service.cc +++ b/message/messaging_service.cc @@ -692,7 +692,7 @@ messaging_service::get_rpc_client_idx(messaging_verb verb) const { const auto curr_sched_group = current_scheduling_group(); for (unsigned i = 0; i < _connection_index_for_tenant.size(); ++i) { if (_connection_index_for_tenant[i].sched_group == curr_sched_group) { - // i == 0: the default tenant maps to the default client indexes beloning to the interval + // i == 0: the default tenant maps to the default client indexes belonging to the interval // [PER_SHARD_CONNECTION_COUNT, PER_SHARD_CONNECTION_COUNT + PER_TENANT_CONNECTION_COUNT). idx += i * PER_TENANT_CONNECTION_COUNT; break; diff --git a/mutation/position_in_partition.hh b/mutation/position_in_partition.hh index c9d70fdf58..c58e125f92 100644 --- a/mutation/position_in_partition.hh +++ b/mutation/position_in_partition.hh @@ -362,10 +362,10 @@ public: // Strong exception guarantees. position_in_partition& operator=(position_in_partition_view view) { - // The copy assigment to _ck can throw (because it allocates), + // The copy assignment to _ck can throw (because it allocates), // but assignments to _type and _bound_weight can't throw. // Thus, to achieve strong exception guarantees, - // we only need to perform the _ck assigmnent before others. + // we only need to perform the _ck assignment before others. if (view._ck) { _ck = *view._ck; } else { diff --git a/mutation/range_tombstone.hh b/mutation/range_tombstone.hh index 3c3c686707..494cb6c247 100644 --- a/mutation/range_tombstone.hh +++ b/mutation/range_tombstone.hh @@ -224,7 +224,7 @@ struct appending_hash { // follow the ordering used by the mutation readers. // // Unless the accumulator is in the reverse mode, after apply(rt) or -// tombstone_for_row(ck) are called there are followng restrictions for +// tombstone_for_row(ck) are called there are following restrictions for // subsequent calls: // - apply(rt1) can be invoked only if rt.start_bound() < rt1.start_bound() // and ck < rt1.start_bound() diff --git a/raft/README.md b/raft/README.md index 7cf7390daf..1690365464 100644 --- a/raft/README.md +++ b/raft/README.md @@ -51,7 +51,7 @@ namely: A complete description of expected semantics and guarantees is maintained in the comments for these classes and in sample -implementations. Let's list here key aspects the implementor should +implementations. Let's list here key aspects the implementer should bear in mind: - RPC should implement a model of asynchronous, unreliable network, in which messages can be lost, reordered, retransmitted more than @@ -261,7 +261,7 @@ to truncate Raft log length afterwards, or when the snapshot transfer from the leader is initiated via `rpc::send_snapshot()`. In the latter case the leader's state machine is expected -to contact the follower's state machine and send its snaphsot to +to contact the follower's state machine and send its snapshot to it. When Raft wants to initialize a state machine with a snapshot diff --git a/raft/fsm.cc b/raft/fsm.cc index 38ab996d16..b519a68d2e 100644 --- a/raft/fsm.cc +++ b/raft/fsm.cc @@ -210,7 +210,7 @@ void fsm::become_candidate(bool is_prevote, bool is_leadership_transfer) { if (!std::holds_alternative(_state)) { _output.state_changed = true; } - // When starting a campain we need to reset current leader otherwise + // When starting a campaign we need to reset current leader otherwise // disruptive server prevention will stall an election if quorum of nodes // start election together since each one will ignore vote requests from others @@ -402,7 +402,7 @@ fsm_output fsm::get_output() { // We advance stable index before the entries are // actually persisted, because if writing to stable storage // will fail the FSM will be stopped and get_output() will - // never be called again, so any new sate that assumes that + // never be called again, so any new state that assumes that // the entries are stable will not be observed. advance_stable_idx(output.log_entries.back()->idx); } @@ -737,7 +737,7 @@ void fsm::append_entries_reply(server_id from, append_reply&& reply) { _my_id, from, progress.match_idx, rejected.non_matching_idx); // If non_matching_idx and last_idx are zero it means that a follower is looking for a leader - // as such message cannot be a result of real missmatch. + // as such message cannot be a result of real mismatch. // Send an empty append message to notify it that we are the leader if (rejected.non_matching_idx == index_t{0} && rejected.last_idx == index_t{0}) { logger.trace("append_entries_reply[{}->{}]: send empty append message", _my_id, from); diff --git a/raft/raft.hh b/raft/raft.hh index 0103203296..8f31911327 100644 --- a/raft/raft.hh +++ b/raft/raft.hh @@ -533,7 +533,7 @@ static constexpr logical_clock::duration ELECTION_TIMEOUT = logical_clock::durat // rpc, persistence and state_machine classes will have to be implemented by the // raft user to provide network, persistency and busyness logic support -// repectively. +// respectively. class rpc; class persistence; @@ -553,7 +553,7 @@ public: // more than one entry all of them will be committed simultaneously. // Will be eventually called on all replicas, for all committed commands. // Raft owns the data since it may be still replicating. - // Raft will not call another apply until the retuned future + // Raft will not call another apply until the returned future // will not become ready. virtual future<> apply(std::vector command) = 0; diff --git a/raft/server.cc b/raft/server.cc index fc9f207caa..40d0f00334 100644 --- a/raft/server.cc +++ b/raft/server.cc @@ -1202,7 +1202,7 @@ future<> server_impl::applier_fiber() { // Completion notification code assumes that previous snapshot is applied // before new entries are committed, otherwise it asserts that some // notifications were missing. To prevent a committed entry to - // be notified before an erlier snapshot is applied do both + // be notified before an earlier snapshot is applied do both // notification and snapshot application in the same fiber notify_waiters(_awaited_commits, batch); diff --git a/raft/server.hh b/raft/server.hh index c040e6d922..2489545c57 100644 --- a/raft/server.hh +++ b/raft/server.hh @@ -49,7 +49,7 @@ public: // If set to true will enable prevoting stage during election bool enable_prevoting = true; // If set to true, forward configuration and entries from - // follower to the leader autmatically. This guarantees + // follower to the leader automatically. This guarantees // add_entry()/modify_config() never throws not_a_leader, // but makes timed_out_error more likely. bool enable_forwarding = true; @@ -242,7 +242,7 @@ public: virtual void tick() = 0; // Returned future is resolved when state changes - // State changes can be coalesced, so it is not guarantied that the caller will + // State changes can be coalesced, so it is not guaranteed that the caller will // get notification about each one of them. The state can even be the same after // the call as before, but term should be different. virtual future<> wait_for_state_change(seastar::abort_source* as = nullptr) = 0; diff --git a/raft/tracker.cc b/raft/tracker.cc index 0fe348e77e..e0ea1d257e 100644 --- a/raft/tracker.cc +++ b/raft/tracker.cc @@ -91,10 +91,10 @@ bool follower_progress::can_send_to() { } // If this is called when a tracker is just created, the current -// progress is empty and we should simply crate an instance for +// progress is empty and we should simply create an instance for // each follower. // When switching configurations, we should preserve progress -// for existing followers, crate progress for new, and remove +// for existing followers, create progress for new, and remove // progress for non-members (to make sure we don't send noise // messages to them). void tracker::set_configuration(const configuration& configuration, index_t next_idx) { diff --git a/raft/tracker.hh b/raft/tracker.hh index 0500c5f1ff..c20be5fa49 100644 --- a/raft/tracker.hh +++ b/raft/tracker.hh @@ -38,7 +38,7 @@ public: PROBE, // In this state multiple append entries are sent optimistically PIPELINE, - // In this state snapshot is been transfered + // In this state snapshot is been transferred SNAPSHOT }; state state = state::PROBE; diff --git a/readers/combined.cc b/readers/combined.cc index 0cbe31a6d8..6cac7eb640 100644 --- a/readers/combined.cc +++ b/readers/combined.cc @@ -409,7 +409,7 @@ future mutation_reader_merger::prepare_one( // end-of-stream to know what readers to ff. We can't // just ff all readers as we might drop fragments from // partitions we haven't even read yet. - // Readers whoose last emitted fragment was a partition + // Readers whose last emitted fragment was a partition // end are out of data for good for the current range. _halted_readers.push_back(rk); } else if (_fwd_mr == mutation_reader::forwarding::no) { diff --git a/readers/flat_mutation_reader_v2.hh b/readers/flat_mutation_reader_v2.hh index fc36c9eea6..bd8c83d926 100644 --- a/readers/flat_mutation_reader_v2.hh +++ b/readers/flat_mutation_reader_v2.hh @@ -506,7 +506,7 @@ public: } // Changes the range of partitions to pr. The range can only be moved - // forwards. pr.begin() needs to be larger than pr.end() of the previousl + // forwards. pr.begin() needs to be larger than pr.end() of the previously // used range (i.e. either the initial one passed to the constructor or a // previous fast forward target). // pr needs to be valid until the reader is destroyed or fast_forward_to() @@ -553,8 +553,8 @@ public: future<> close() noexcept { if (auto i = std::move(_impl)) { auto f = i->close(); - // most close implementations are expexcted to return a ready future - // so expedite prcessing it. + // most close implementations are expected to return a ready future + // so expedite processing it. if (f.available() && !f.failed()) { return f; } @@ -602,7 +602,7 @@ public: // Cannot be called if is_buffer_empty() returns true. const mutation_fragment_v2& peek_buffer() const { return _impl->_buffer.front(); } // The actual buffer size of the reader. - // Altough we consistently refer to this as buffer size throught the code + // Although we consistently refer to this as buffer size throught the code // we really use "buffer size" as the size of the collective memory // used by all the mutation fragments stored in the buffer of the reader. size_t buffer_size() const { @@ -753,7 +753,7 @@ future<> consume_partitions(flat_mutation_reader_v2& reader, Consumer consumer) }); } -/// A cosumer function that is passed a flat_mutation_reader to be consumed from +/// A consumer function that is passed a flat_mutation_reader to be consumed from /// and returns a future<> resolved when the reader is fully consumed, and closed. /// Note: the function assumes ownership of the reader and must close it in all cases. using reader_consumer_v2 = noncopyable_function (flat_mutation_reader_v2)>; diff --git a/readers/multishard.cc b/readers/multishard.cc index 3abfecc631..cb6354faaf 100644 --- a/readers/multishard.cc +++ b/readers/multishard.cc @@ -605,8 +605,8 @@ future<> evictable_reader_v2::fill_buffer() { auto* next_mf = co_await _reader->peek(); // First make sure we've made progress w.r.t. _next_position_in_partition. - // This loop becomes inifinite when next pos is a partition start. - // In that case progress is guranteed anyway, so skip this loop entirely. + // This loop becomes infinite when next pos is a partition start. + // In that case progress is guaranteed anyway, so skip this loop entirely. while (!_next_position_in_partition.is_partition_start() && next_mf && _tri_cmp(buffer().back().position(), _next_position_in_partition) <= 0) { push_mutation_fragment(_reader->pop_mutation_fragment()); next_mf = co_await _reader->peek(); diff --git a/repair/repair.hh b/repair/repair.hh index 91f5a7324b..e2301a7f02 100644 --- a/repair/repair.hh +++ b/repair/repair.hh @@ -71,7 +71,7 @@ public: struct repair_uniq_id { // The integer ID used to identify a repair job. It is currently used by nodetool and http API. int id; - // Task info containing a UUID to identifiy a repair job, and a shard of the job. + // Task info containing a UUID to identify a repair job, and a shard of the job. // We will transit to use UUID over the integer ID. tasks::task_info task_info; diff --git a/repair/row_level.cc b/repair/row_level.cc index b2b7786d7e..34d045003a 100644 --- a/repair/row_level.cc +++ b/repair/row_level.cc @@ -1235,7 +1235,7 @@ private: // Delete the rows > _current_sync_boundary from _row_buf // Swap _working_row_buf and _row_buf so that _working_row_buf // contains rows within (_last_sync_boundary, - // _current_sync_boundary], _row_buf contains rows wthin + // _current_sync_boundary], _row_buf contains rows within // (_current_sync_boundary, ...] repair_row& r = *it; if (_cmp(r.boundary(), *_current_sync_boundary) <= 0) { @@ -1536,7 +1536,7 @@ public: future get_combined_row_hash_handler(std::optional common_sync_boundary) { // We can not call this function twice. The good thing is we do not use - // retransmission at messaging_service level, so no message will be retransmited. + // retransmission at messaging_service level, so no message will be retransmitted. rlogger.trace("Calling get_combined_row_hash_handler"); return with_gate(_gate, [this, common_sync_boundary = std::move(common_sync_boundary)] () mutable { _cf.update_off_strategy_trigger(); diff --git a/replica/database.cc b/replica/database.cc index f0e091985b..9564880d3d 100644 --- a/replica/database.cc +++ b/replica/database.cc @@ -2257,7 +2257,7 @@ database::make_keyspace_config(const keyspace_metadata& ksm) { cfg.all_datadirs.push_back(format("{}/{}", extra, ksm.name())); } cfg.enable_disk_writes = !_cfg.enable_in_memory_data_store(); - cfg.enable_disk_reads = true; // we allways read from disk + cfg.enable_disk_reads = true; // we always read from disk cfg.enable_commitlog = _cfg.enable_commitlog() && !_cfg.enable_in_memory_data_store(); cfg.enable_cache = _cfg.enable_cache(); diff --git a/replica/database.hh b/replica/database.hh index 17bf888bf3..8e33fde659 100644 --- a/replica/database.hh +++ b/replica/database.hh @@ -714,7 +714,7 @@ public: lw_shared_ptr sstables, gc_clock::time_point compaction_time) const; // Make a reader which reads only from the row-cache. - // The reader doens't populate the cache, it reads only what is in the cache + // The reader doesn't populate the cache, it reads only what is in the cache // Supports reading only a single partition. // Does not support reading in reverse. flat_mutation_reader_v2 make_nonpopulating_cache_reader(schema_ptr schema, reader_permit permit, const dht::partition_range& range, @@ -1166,10 +1166,10 @@ public: // Returns true iff sst was found and erased. bool erase_sstable_cleanup_state(const sstables::shared_sstable& sst); - // Returns true if the sstable requries cleanup. + // Returns true if the sstable requires cleanup. bool requires_cleanup(const sstables::shared_sstable& sst) const; - // Returns true if any of the sstables requries cleanup. + // Returns true if any of the sstables requires cleanup. bool requires_cleanup(const sstables::sstable_set& set) const; // Takes snapshot of current storage state (includes memtable and sstables) from diff --git a/replica/dirty_memory_manager.hh b/replica/dirty_memory_manager.hh index 2020cd3f16..dbc869769d 100644 --- a/replica/dirty_memory_manager.hh +++ b/replica/dirty_memory_manager.hh @@ -69,7 +69,7 @@ public: // // These callbacks will be called when the dirty memory manager // see relevant changes in the memory pressure conditions for this region_group. By specializing -// those methods - which are a nop by default - the callers initiate memtable flusing to +// those methods - which are a nop by default - the callers initiate memtable flushing to // free real and unspooled memory. // The following restrictions apply to implementations of start_reclaiming() and stop_reclaiming(): diff --git a/replica/distributed_loader.cc b/replica/distributed_loader.cc index 805452a24b..baf2dcd9b2 100644 --- a/replica/distributed_loader.cc +++ b/replica/distributed_loader.cc @@ -213,7 +213,7 @@ distributed_loader::process_upload_dir(distributed& db, distr }; // Pass owned_ranges_ptr to reshard to piggy-back cleanup on the resharding compaction. // Note that needs_cleanup() is inaccurate and may return false positives, - // maybe triggerring resharding+cleanup unnecessarily for some sstables. + // maybe triggering resharding+cleanup unnecessarily for some sstables. // But this is resharding on refresh (sstable loading via upload dir), // which will usually require resharding anyway. // diff --git a/replica/table.cc b/replica/table.cc index 72e4fe21d3..e63669fcdf 100644 --- a/replica/table.cc +++ b/replica/table.cc @@ -1214,7 +1214,7 @@ table::sstable_list_builder::build_new_list(const sstables::sstable_set& current // this might seem dangerous, but "move" here just avoids constness, // making the two ranges compatible when compiling with boost 1.55. - // Noone is actually moving anything... + // No one is actually moving anything... for (auto all = current_sstables.all(); auto&& tab : boost::range::join(new_sstables, std::move(*all))) { if (!s.contains(tab)) { new_sstable_list.insert(tab); diff --git a/schema/schema.cc b/schema/schema.cc index 5224c88812..01fc7dfbe2 100644 --- a/schema/schema.cc +++ b/schema/schema.cc @@ -1115,7 +1115,7 @@ schema_builder& schema_builder::with_column_ordered(const column_definition& c) } schema_builder& schema_builder::with_column(bytes name, data_type type, column_kind kind, column_view_virtual is_view_virtual) { - // component_index will be determined by schema cosntructor + // component_index will be determined by schema constructor return with_column(name, type, kind, 0, is_view_virtual); } diff --git a/schema/schema.hh b/schema/schema.hh index 9aab45ee7e..6a6564e465 100644 --- a/schema/schema.hh +++ b/schema/schema.hh @@ -55,7 +55,7 @@ using column_count_type = uint32_t; using column_id = column_count_type; // Column ID unique within a schema. Enum class to avoid -// mixing wtih column id. +// mixing with column id. enum class ordinal_column_id: column_count_type {}; std::ostream& operator<<(std::ostream& os, ordinal_column_id id); @@ -536,10 +536,10 @@ class partition_slice; * * Code using a particular extension can locate it by name in the schema map, * and barring the "is_placeholder" says true, cast it to whatever might - * be the expeceted implementation. + * be the expected implementation. * * We allow placeholder object since an extension written to schema tables - * might be unavailable on next boot/other node. To avoid loosing the config data, + * might be unavailable on next boot/other node. To avoid losing the config data, * a placeholder object is put into schema map, which at least can * re-serialize the data back. * diff --git a/schema/schema_registry.cc b/schema/schema_registry.cc index ab901c6b1d..2fe0b1cf02 100644 --- a/schema/schema_registry.cc +++ b/schema/schema_registry.cc @@ -331,7 +331,7 @@ schema_ptr global_schema_ptr::get() const { schema_ptr registered_bs; // the following code contains registry entry dereference of a foreign shard - // however, it is guarantied to succeed since we made sure in the constructor + // however, it is guaranteed to succeed since we made sure in the constructor // that _bs_schema and _ptr will have a registry on the foreign shard where this // object originated so as long as this object lives the registry entries lives too // and it is safe to reference them on foreign shards. diff --git a/scripts/open-coredump.sh b/scripts/open-coredump.sh index 2c765b419a..944a06f63b 100755 --- a/scripts/open-coredump.sh +++ b/scripts/open-coredump.sh @@ -34,11 +34,11 @@ Sometimes the metadata retrieved from the build lacks the package URL. In this case, the scylla package can be downloaded manually and extracted into the artifact directory (see below) using the "scylla.package" name. When this directory exists, the script will not attempt to extract the -package URL from the metadata and dowload the package itself, instead it +package URL from the metadata and download the package itself, instead it will use the provided package. The script is idempotent: running it after the prepartory steps will -re-use what is already donwloaded. It is *strongly* recommended to run +reuse what is already downloaded. It is *strongly* recommended to run this from an empty directory, with nothing but the core-file present. Options: diff --git a/service/client_state.hh b/service/client_state.hh index 9591f4fe45..e55f0fa4ce 100644 --- a/service/client_state.hh +++ b/service/client_state.hh @@ -264,7 +264,7 @@ public: * As during the prepared phase replica send us the last propose they accepted, a first option would be to take * the maximum of those last accepted proposal timestamp plus 1 (and use a default value, say 0, if it's the * first known proposal for the partition). This would mostly work (giving commits the timestamp 0, 1, 2, ... - * in the order they are commited) but with 2 important caveats: + * in the order they are committed) but with 2 important caveats: * 1) it would give a very poor experience when Paxos and non-Paxos updates are mixed in the same partition, * since paxos operations wouldn't be using microseconds timestamps. And while you shouldn't theoretically * mix the 2 kind of operations, this would still be pretty nonintuitive. And what if you started writing diff --git a/service/forward_service.hh b/service/forward_service.hh index 0a785f0dfe..169deb0b63 100644 --- a/service/forward_service.hh +++ b/service/forward_service.hh @@ -59,7 +59,7 @@ class storage_proxy; // Query splitting example (3 node cluster with num_tokens set to 3): // Original query: forward_request{ // reduction_types=[reduction_type{count}], -// cmd=read_command{contents ommited}, +// cmd=read_command{contents omitted}, // pr={(-inf, +inf)}, // cl=ONE, // timeout(ms)=4864752279 @@ -83,7 +83,7 @@ class storage_proxy; // // forward_request{ // reduction_types=[reduction_type{count}], -// cmd=read_command{contents ommited}, +// cmd=read_command{contents omitted}, // pr={ // (-inf, {-7656156436523256816, end}], // ({-885518633547994880, end}, {-881470678946355457, end}], @@ -96,7 +96,7 @@ class storage_proxy; // // forward_request{ // reduction_types=[reduction_type{count}], -// cmd=read_command{contents ommited}, +// cmd=read_command{contents omitted}, // pr={ // ({-7656156436523256816, end}, {-6273657286650174294, end}], // ({-6273657286650174294, end}, {-885518633547994880, end}], @@ -108,7 +108,7 @@ class storage_proxy; // // forward_request{ // reduction_types=[reduction_type{count}], -// cmd=read_command{contents ommited}, +// cmd=read_command{contents omitted}, // pr={ // ({-589668175639820781, end}, {1403899953968875783, end}], // ({1403899953968875783, end}, {6175622851574774197, end}], diff --git a/service/pager/query_pagers.cc b/service/pager/query_pagers.cc index 9a59db14fb..661a0032e1 100644 --- a/service/pager/query_pagers.cc +++ b/service/pager/query_pagers.cc @@ -379,7 +379,7 @@ void query_pager::handle_result( uint32_t page_size, gc_clock::time_point now) { auto update_slice = [&] (const partition_key& last_pkey) { - // refs #752, when doing aggregate queries we will re-use same + // refs #752, when doing aggregate queries we will reuse same // slice repeatedly. Since "specific ck ranges" only deal with // a single extra range, we must clear out the old one // Even if it was not so of course, leaving junk in the slice diff --git a/service/paxos/paxos_state.cc b/service/paxos/paxos_state.cc index 55d2971077..c1288d1182 100644 --- a/service/paxos/paxos_state.cc +++ b/service/paxos/paxos_state.cc @@ -200,7 +200,7 @@ future<> paxos_state::learn(storage_proxy& sp, db::system_keyspace& sys_ks, sche // Even though there is no guarantee we will see decisions in the right order, // because messages can get delayed, so this decision can be older than our current most // recent accepted proposal/committed decision, saving it is always safe due to column timestamps. - // Since the mutation uses the decision ballot timestamp, if cell timestmap of any current cell + // Since the mutation uses the decision ballot timestamp, if cell timestamp of any current cell // is strictly greater than the decision one, saving the decision will not erase it. // // The table may have been truncated since the proposal was initiated. In that case, we diff --git a/service/paxos/paxos_state.hh b/service/paxos/paxos_state.hh index c92d549e96..805b5732b7 100644 --- a/service/paxos/paxos_state.hh +++ b/service/paxos/paxos_state.hh @@ -60,12 +60,12 @@ private: static thread_local key_lock_map _paxos_table_lock; // Taken by the coordinator code to allow only one instance of PAXOS to run for each key. // This prevents contantion between multiple clients trying to modify the - // same key throug the same coordinator and stealing the ballot from - // eachother. + // same key through the same coordinator and stealing the ballot from + // each other. static thread_local key_lock_map _coordinator_lock; - // protects acess to system.paxos + // protects access to system.paxos template static futurize_t> with_locked_key(const dht::token& key, clock_type::time_point timeout, Func func) { diff --git a/service/qos/service_level_controller.cc b/service/qos/service_level_controller.cc index a1bd014cce..67dec84d22 100644 --- a/service/qos/service_level_controller.cc +++ b/service/qos/service_level_controller.cc @@ -72,7 +72,7 @@ void service_level_controller::set_distributed_data_accessor(service_level_distr // Registration of a new accessor can be done only when the _sl_data_accessor is not already set. // This behavior is intended to allow to unit testing debug to set this value without having - // overriden by storage_proxy + // overridden by storage_proxy if (!_sl_data_accessor) { _sl_data_accessor = sl_data_accessor; } diff --git a/service/raft/discovery.hh b/service/raft/discovery.hh index dc80f253d8..d8a16e5b2e 100644 --- a/service/raft/discovery.hh +++ b/service/raft/discovery.hh @@ -110,7 +110,7 @@ public: std::optional request(const peer_list& peers); // Submit a reply from one of the peers to this discovery - // state machine. If this node is a leader, resposne is + // state machine. If this node is a leader, response is // ignored. void response(discovery_peer from, const peer_list& peers); diff --git a/service/raft/raft_state_machine.hh b/service/raft/raft_state_machine.hh index 49602571a0..e4599f7f6d 100644 --- a/service/raft/raft_state_machine.hh +++ b/service/raft/raft_state_machine.hh @@ -12,7 +12,7 @@ namespace service { -// Scylla specific extention for raft state machine +// Scylla specific extension for raft state machine // Snapshot transfer is delegated to a state machine implementation class raft_state_machine : public raft::state_machine { public: diff --git a/service/storage_proxy.cc b/service/storage_proxy.cc index 87c9a604ec..a009ef5563 100644 --- a/service/storage_proxy.cc +++ b/service/storage_proxy.cc @@ -998,7 +998,7 @@ public: // called only when all replicas replied virtual void release_mutation() = 0; // called when reply is received - // alllows mutation holder to have its own accounting + // allows mutation holder to have its own accounting virtual void reply(gms::inet_address ep) {}; }; @@ -1169,7 +1169,7 @@ private: // Unique request id for logging purposes. const uint64_t _id = next_id++; - // max pruning operations to run in parralel + // max pruning operations to run in parallel static constexpr uint16_t pruning_limit = 1000; public: @@ -1214,7 +1214,7 @@ public: _cl_for_learn = cl; } // this is called with an id of a replica that replied to learn request - // adn returns true when quorum of such requests are accumulated + // and returns true when quorum of such requests are accumulated bool learned(gms::inet_address ep); const locator::effective_replication_map_ptr& get_effective_replication_map() const noexcept { @@ -1285,8 +1285,8 @@ protected: db::write_type _type; std::unique_ptr _mutation_holder; inet_address_vector_replica_set _targets; // who we sent this mutation to - // added dead_endpoints as a memeber here as well. This to be able to carry the info across - // calls in helper methods in a convinient way. Since we hope this will be empty most of the time + // added dead_endpoints as a member here as well. This to be able to carry the info across + // calls in helper methods in a convenient way. Since we hope this will be empty most of the time // it should not be a huge burden. (flw) inet_address_vector_topology_change _dead_endpoints; size_t _cl_acks = 0; @@ -3353,7 +3353,7 @@ future<> storage_proxy::mutate_counters(Range&& mutations, db::consistency_level { // Would be better to use the effective replication map we started with, but: // - this is wrong anyway since we picked a random schema - // - we only use this to calculate some infomation for the error message + // - we only use this to calculate some information for the error message // - the topology coordinator should prevent incompatible changes while requests // (like this one) are in flight auto& table = _db.local().find_column_family(s->id()); @@ -3477,7 +3477,7 @@ future<> storage_proxy::replicate_counter_from_leader(mutation m, db::consistenc /* * Range template parameter can either be range of 'mutation' or a range of 'std::unordered_map'. * create_write_response_handler() has specialization for both types. The one for the former uses keyspace to figure out - * endpoints to send mutation to, the one for the late uses enpoints that are used as keys for the map. + * endpoints to send mutation to, the one for the late uses endpoints that are used as keys for the map. */ template future> @@ -3779,7 +3779,7 @@ future<> storage_proxy::send_to_endpoint( std::optional timeout; db::consistency_level cl = allow_hints ? db::consistency_level::ANY : db::consistency_level::ONE; if (type == db::write_type::VIEW) { - // View updates have a near-infinite timeout to avoid incurring the extra work of writting hints + // View updates have a near-infinite timeout to avoid incurring the extra work of writing hints // and to apply backpressure. timeout = clock_type::now() + 5min; } @@ -4117,9 +4117,9 @@ public: // do not report timeouts, the whole operation will timeout and be reported return; // also do not report timeout as replica failure for the same reason } else if (try_catch(eptr)) { - // do not report aborts, they are trigerred by shutdown or timeouts + // do not report aborts, they are triggered by shutdown or timeouts } else if (try_catch(eptr)) { - // do not report gate_closed errors, they are trigerred by shutdown (See #8995) + // do not report gate_closed errors, they are triggered by shutdown (See #8995) } else if (auto ex = try_catch(eptr)) { // Log remote read error with lower severity. // If it is really severe it we be handled on the host that sent @@ -4791,7 +4791,7 @@ protected: db::consistency_level _cl; size_t _block_for; inet_address_vector_replica_set _targets; - // Targets that were succesfully used for a data or digest request + // Targets that were successfully used for a data or digest request inet_address_vector_replica_set _used_targets; promise>>> _result_promise; tracing::trace_state_ptr _trace_state; @@ -5620,7 +5620,7 @@ storage_proxy::query_partition_key_range_concurrent(storage_proxy::clock_type::t // query_ranges_to_vnodes_generator can return less results than requested. If the number of results // is small enough or there are a lot of results - concurrentcy_factor which is increased by shifting left can - // eventualy zero out resulting in an infinite recursion. This line makes sure that concurrency factor is never + // eventually zero out resulting in an infinite recursion. This line makes sure that concurrency factor is never // get stuck on 0 and never increased too much if the number of results remains small. concurrency_factor = std::max(size_t(1), ranges.size()); @@ -5666,7 +5666,7 @@ storage_proxy::query_partition_key_range_concurrent(storage_proxy::clock_type::t // Luckily, a full contiguity check here is not needed. // Ranges that we want to merge here are formed by dividing a bigger ranges using // query_ranges_to_vnodes_generator. By knowing query_ranges_to_vnodes_generator internals, - // it can be assumed that usually, mergable ranges are of the form [a, b) [b, c). + // it can be assumed that usually, mergeable ranges are of the form [a, b) [b, c). // Therefore, for the most part, contiguity check is reduced to equality & inclusivity test. // It's fine, that we don't detect contiguity of some other possibly contiguous // ranges (like [a, b] [b+1, c]), because not merging contiguous ranges (as opposed @@ -6048,7 +6048,7 @@ static mutation_write_failure_exception read_failure_to_write(schema_ptr s, read * coordinator to come along and trump our own promise with a newer one but is otherwise safe. * * NOTE: `cmd` argument can be nullptr, in which case it's guaranteed that this function would not perform - * any reads of commited values (in case user of the function is not interested in them). + * any reads of committed values (in case user of the function is not interested in them). * * WARNING: the function should be called on a shard that owns the key cas() operates on */ @@ -6139,7 +6139,7 @@ future storage_proxy::cas(schema_ptr schema, shared_ptr reque condition_met = false; } // If a condition is not met we still need to complete paxos round to achieve - // linearizability otherwise next write attempt may read differnt value as described + // linearizability otherwise next write attempt may read different value as described // in https://github.com/scylladb/scylla/issues/6299 // Let's use empty mutation as a value and proceed mutation.emplace(handler->schema(), handler->key()); diff --git a/service/storage_proxy.hh b/service/storage_proxy.hh index e631c81abb..1a448459c1 100644 --- a/service/storage_proxy.hh +++ b/service/storage_proxy.hh @@ -290,7 +290,7 @@ private: * Therefore, at the moment of initializing storage_proxy, we don't have access to cdc_service yet. * * Furthermore, storage_proxy must keep the service object alive while augmenting mutations - * (storage_proxy is never deintialized, and even if it would be, it would be after deinitializing cdc_service). + * (storage_proxy is never deinitialized, and even if it would be, it would be after deinitializing cdc_service). * Thus cdc_service inherits from enable_shared_from_this and storage_proxy code must remember to call * shared_from_this(). * diff --git a/service/storage_service.cc b/service/storage_service.cc index 4d9d8ac45e..9b63e3ec39 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -244,7 +244,7 @@ bool storage_service::is_first_node() { } // Node with the smallest IP address is chosen as the very first node // in the cluster. The first node is the only node that does not - // bootstrap in the cluser. All other nodes will bootstrap. + // bootstrap in the cluster. All other nodes will bootstrap. std::vector sorted_seeds(seeds.begin(), seeds.end()); std::sort(sorted_seeds.begin(), sorted_seeds.end()); if (sorted_seeds.front() == get_broadcast_address()) { @@ -3188,7 +3188,7 @@ future<> storage_service::join_token_ring(sharded handshaker = _raft_topology_change_enabled ? ::make_shared(*this, join_params) : _group0->make_legacy_handshaker(false); @@ -3224,7 +3224,7 @@ future<> storage_service::join_token_ring(sharded> storage_service::effective_ownership( auto ranges = ss.get_ranges_for_endpoint(erm, endpoint); for (auto& r : ranges) { // get_ranges_for_endpoint will unwrap the first range. - // With t0 t1 t2 t3, the first range (t3,t0] will be splitted + // With t0 t1 t2 t3, the first range (t3,t0] will be split // as (min,t0] and (t3,max]. Skippping the range (t3,max] // we will get the correct ownership number as if the first - // range were not splitted. + // range were not split. if (!r.end()) { continue; } @@ -4976,7 +4976,7 @@ future<> storage_service::raft_removenode(locator::host_id host_id, std::listsecond; // not usable after yeild + auto& rs = it->second; // not usable after yield if (rs.state != node_state::normal) { throw std::runtime_error(::format("removenode: node {} is in '{}' state. Wait for it to be in 'normal' state", id, rs.state)); @@ -5111,7 +5111,7 @@ future<> storage_service::removenode(locator::host_id host_id, std::list storage_service::raft_topology_cmd_handler(raft // The retrier does: // If no operation was previously started - start it now // If previous operation still running - wait for it an return its result - // If previous operation completed sucessfully - return immediately - // If previous opertaion failed - restart it + // If previous operation completed successfully - return immediately + // If previous operation failed - restart it auto retrier = [] (std::optional>& f, auto&& func) -> future<> { if (!f || f->failed()) { if (f) { diff --git a/service/topology_state_machine.hh b/service/topology_state_machine.hh index e2cc5e63ef..d2e4a7c1cd 100644 --- a/service/topology_state_machine.hh +++ b/service/topology_state_machine.hh @@ -26,7 +26,7 @@ namespace service { enum class node_state: uint16_t { - none, // the new node joined group0 but did not bootstraped yet (has no tokens and data to serve) + none, // the new node joined group0 but did not bootstrapped yet (has no tokens and data to serve) bootstrapping, // the node is currently in the process of streaming its part of the ring decommissioning, // the node is being decommissioned and stream its data to nodes that took over removing, // the node is being removed and its data is streamed to nodes that took over from still alive owners @@ -126,7 +126,7 @@ struct topology { std::unordered_map requests; // Holds parameters for a request per node and valid during entire - // operation untill the node becomes normal + // operation until the node becomes normal std::unordered_map req_param; // Pending global topology request (i.e. not related to any specific node). @@ -140,7 +140,7 @@ struct topology { // It's used as the first column of the clustering key in CDC_GENERATIONS_V3 table. std::optional new_cdc_generation_data_uuid; - // The IDs of the commited yet unpublished CDC generations sorted by timestamps. + // The IDs of the committed yet unpublished CDC generations sorted by timestamps. std::vector unpublished_cdc_generations; // Set of features that are considered to be enabled by the cluster. @@ -182,7 +182,7 @@ struct raft_topology_cmd { enum class command: uint16_t { barrier, // request to wait for the latest topology barrier_and_drain, // same + drain requests which use previous versions - stream_ranges, // reqeust to stream data, return when streaming is + stream_ranges, // request to stream data, return when streaming is // done shutdown, // a decommissioning node should shut down }; diff --git a/sstables/binary_search.hh b/sstables/binary_search.hh index e7b0d1e8e7..a33f63cf6c 100644 --- a/sstables/binary_search.hh +++ b/sstables/binary_search.hh @@ -32,7 +32,7 @@ namespace sstables { * It's easier to reuse the same code for both binary searches, and just ignore * the extra information when not needed. * - * This code should work in all kinds of vectors in whose's elements is possible to aquire + * This code should work in all kinds of vectors in whose's elements is possible to acquire * a key view via get_key(). */ template diff --git a/sstables/compress.hh b/sstables/compress.hh index 37688cfae3..cef915fbc8 100644 --- a/sstables/compress.hh +++ b/sstables/compress.hh @@ -72,7 +72,7 @@ struct compression { // // This is not a general purpose container. There are limitations: // * Can't be used before init() is called. - // * at() is best called incrementally, altough random lookups are + // * at() is best called incrementally, although random lookups are // perfectly valid as well. // * The iterator and at() can't provide references to the elements. // * No point insert is available. diff --git a/sstables/disk_types.hh b/sstables/disk_types.hh index b61c0802db..f8b17c46bb 100644 --- a/sstables/disk_types.hh +++ b/sstables/disk_types.hh @@ -24,7 +24,7 @@ namespace sstables { // represents how large they are. They can be a byte-length, in the case of a // string, number of elements, in the case of an array, etc. // -// For those elements, we encapsulate the underlying type in an outter +// For those elements, we encapsulate the underlying type in an outer // structure that embeds how large is the in-disk size. It is a lot more // convenient to embed it in the size than explicitly writing it in the parser. // This way, we don't need to encode this information in multiple places at diff --git a/sstables/generation_type.hh b/sstables/generation_type.hh index f29f96cadb..3956c72d8a 100644 --- a/sstables/generation_type.hh +++ b/sstables/generation_type.hh @@ -226,11 +226,11 @@ struct fmt::formatter : fmt::formatter segment_infos{{ {16, 4, 4}, {16, 5, 6}, diff --git a/sstables/sstable_directory.cc b/sstables/sstable_directory.cc index 5b0d1d9340..3969eb0df4 100644 --- a/sstables/sstable_directory.cc +++ b/sstables/sstable_directory.cc @@ -558,7 +558,7 @@ future<> sstable_directory::delete_with_pending_deletion_log(std::vector end, we may // read beyond end in anticipation of a small skip via fast_foward_to. // The amount of this excessive read is controlled by read ahead -// hueristics which learn from the usefulness of previous read aheads. +// heuristics which learn from the usefulness of previous read aheads. template inline std::unique_ptr data_consume_rows(const schema& s, shared_sstable sst, typename DataConsumeRowsContext::consumer& consumer, sstable::disk_read_range toread, uint64_t last_end) { // Although we were only asked to read until toread.end, we'll not limit diff --git a/sstables/sstables.cc b/sstables/sstables.cc index deac9e4c80..49dbe33d91 100644 --- a/sstables/sstables.cc +++ b/sstables/sstables.cc @@ -165,7 +165,7 @@ const std::unordered_map Value> static typename Map::key_type reverse_map(const Value& v, const Map& map) { @@ -1669,7 +1669,7 @@ bool sstable::may_contain_rows(const query::clustering_row_ranges& ranges) const // Include sstables with tombstones that are not scylla's since // they may contain partition tombstones that are not taken into - // account in min/max coloumn names metadata. + // account in min/max column names metadata. // We clear min/max metadata for partition tombstones so they // will match as containing the rows we're looking for. if (!has_scylla_component()) { diff --git a/sstables/sstables.hh b/sstables/sstables.hh index 2991c83f6d..528eaa4602 100644 --- a/sstables/sstables.hh +++ b/sstables/sstables.hh @@ -487,7 +487,7 @@ public: * or the sstable's schema does not have clustering columns. * * But if the schema has clustering columns and the sstable is sufficiently ``modern'', - * the returned value should be equal to the smallest clustering key occuring in the sstable (across all partitions). + * the returned value should be equal to the smallest clustering key occurring in the sstable (across all partitions). * * The lower bound is inclusive: there might be a clustering row with position equal to min_position. */ @@ -500,7 +500,7 @@ public: * * If certain conditions are satisfied (the same as for `min_position`, see above), * the returned value should be equal to after_key(ck), where ck is the greatest clustering key - * occuring in the sstable (across all partitions). + * occurring in the sstable (across all partitions). */ const position_in_partition& max_position() const { return _min_max_position_range.end(); diff --git a/sstables/storage.cc b/sstables/storage.cc index 3c4a7cd047..ad86c5c05d 100644 --- a/sstables/storage.cc +++ b/sstables/storage.cc @@ -285,7 +285,7 @@ future<> filesystem_storage::check_create_links_replay(const sstable& sst, const /// will have both a TemporaryTOC file and a regular TOC file. /// It should be deleted on restart, thus rolling the operation backwards. /// -/// Eventually, if \c mark_for_removal is unset, the detination +/// Eventually, if \c mark_for_removal is unset, the destination /// TemporaryTOC is removed, to "commit" the destination sstable; /// /// Otherwise, if \c mark_for_removal is set, the TemporaryTOC at the destination diff --git a/streaming/stream_manager.hh b/streaming/stream_manager.hh index 5043013032..33c7a0d3cd 100644 --- a/streaming/stream_manager.hh +++ b/streaming/stream_manager.hh @@ -79,7 +79,7 @@ class stream_manager : public gms::i_endpoint_state_change_subscriber, public en /* * Currently running streams. Removed after completion/failure. * We manage them in two different maps to distinguish plan from initiated ones to - * receiving ones withing the same JVM. + * receiving ones within the same JVM. */ private: sharded& _db; diff --git a/streaming/stream_result_future.hh b/streaming/stream_result_future.hh index afb828edc6..ef8c5d4aee 100644 --- a/streaming/stream_result_future.hh +++ b/streaming/stream_result_future.hh @@ -47,7 +47,7 @@ public: stream_result_future(stream_manager& mgr, streaming::plan_id plan_id_, sstring description_, bool is_receiving) : stream_result_future(mgr, plan_id_, description_, make_shared(is_receiving)) { // Note: Origin sets connections_per_host = 0 on receiving side, We set 1 to - // refelct the fact that we actaully create one conncetion to the initiator. + // refelct the fact that we actually create one connection to the initiator. } /** diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 897ca76a5f..11d78312ca 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -8,7 +8,7 @@ add_subdirectory(perf) # # add_scylla_test( # [KIND ] -# [SOUCES ...]) +# [SOURCES ...]) # # kind can be: # * SEASTAR - a unit test that depends on the scylla sources and the diff --git a/test/alternator/README.md b/test/alternator/README.md index 80df064380..b6e534df7b 100644 --- a/test/alternator/README.md +++ b/test/alternator/README.md @@ -19,7 +19,7 @@ More conveniently, instead of starting ScyllaDB on your own, we have a script `test/alternator/run` which does all the work necessary to start ScyllaDB with Alternator, and then runs `pytest` against it. The ScyllaDB process is run in a temporary directory which is automatically deleted when -the test ends. This is recomended way because it configures scylla to start +the test ends. This is recommended way because it configures scylla to start much faster. `run` automatically picks the most-recently compiled version of Scylla in @@ -219,7 +219,7 @@ and practices be followed when writing new tests: Utility functions are bad for several reasons. First, they make it harder to read tests - any reader will understand boto3 requests (and can find many online references for that library), but not be familiar - with dozens of obscure utilty functions. Second, when a utility function + with dozens of obscure utility functions. Second, when a utility function is written for the benefit of a single test, it is often much less general than its author thought, and when it comes time to reuse it in a second test, it turns out it needs to be duplicated or changed, and the result diff --git a/test/alternator/conftest.py b/test/alternator/conftest.py index e3a212e8ca..25e6019ca2 100644 --- a/test/alternator/conftest.py +++ b/test/alternator/conftest.py @@ -4,7 +4,7 @@ # This file contains "test fixtures", a pytest concept described in # https://docs.pytest.org/en/latest/fixture.html. -# A "fixture" is some sort of setup which an invididual test requires to run. +# A "fixture" is some sort of setup which an individual test requires to run. # The fixture has setup code and teardown code, and if multiple tests # require the same fixture, it can be set up only once - while still allowing # the user to run individual tests and automatically set up the fixtures they need. diff --git a/test/alternator/test_batch.py b/test/alternator/test_batch.py index 33b1e917c5..5d2e05f3af 100644 --- a/test/alternator/test_batch.py +++ b/test/alternator/test_batch.py @@ -432,7 +432,7 @@ def test_batch_write_item_too_many(test_table_sn): test_table_sn.name: [{'DeleteRequest': {'Key': {'p': p, 'c': i}}} for i in range(30)] }) -# According to the DynamoDB documention, a single BatchGetItem operation is +# According to the DynamoDB documentation, a single BatchGetItem operation is # limited to retrieving up to 100 items or a total of 16 MB of data, # whichever is smaller. If we read less than those limits in a single # BatchGetItem operation, it should work - though may still return only diff --git a/test/alternator/test_condition_expression.py b/test/alternator/test_condition_expression.py index 74c0b832e9..159e34c639 100644 --- a/test/alternator/test_condition_expression.py +++ b/test/alternator/test_condition_expression.py @@ -185,7 +185,7 @@ def test_update_condition_eq_set(test_table_s): # The above test (test_update_condition_eq_set()) checked equality of simple # set attributes. But an attributes can contain a nested document, where the -# set sits in a deep level (the set itself is a leaf in this heirarchy because +# set sits in a deep level (the set itself is a leaf in this hierarchy because # it can only contain numbers, strings or bytes). We need to correctly support # equality check in that case too. # Reproduces issue #8514. @@ -1293,7 +1293,7 @@ def test_update_condition_size(test_table_s): ConditionExpression='size(a)=f', ExpressionAttributeValues={':val': 6}) assert test_table_s.get_item(Key={'p': p}, ConsistentRead=True)['Item']['z'] == 6 - # After testing the "=" operator throughly, check other operators are also + # After testing the "=" operator thoroughly, check other operators are also # supported. test_table_s.update_item(Key={'p': p}, UpdateExpression='SET z = :val', @@ -1402,7 +1402,7 @@ def test_update_condition_attribute_exists_in_comparison(test_table_s): ConditionExpression='attribute_exists(a) < :val', ExpressionAttributeValues={':val': 1}) -# In essense, the size() function tested in the previous test behaves +# In essence, the size() function tested in the previous test behaves # exactly like the functions of UpdateExpressions, i.e., it transforms a # value (attribute from the item or the query) into a new value, which # can then be operated (in our case, compared). In this test we check @@ -1468,7 +1468,7 @@ def test_update_condition_nested_attributes(test_table_s): ExpressionAttributeValues={':val': 4}) assert test_table_s.get_item(Key={'p': p}, ConsistentRead=True)['Item']['c'] == 2 -# All the previous tests refered to attributes using their name directly. +# All the previous tests referred to attributes using their name directly. # But the DynamoDB API also allows to refer to attributes using a #reference. # Among other things this allows using attribute names which are usually # reserved keywords in condition expressions. @@ -1773,7 +1773,7 @@ def test_update_condition_unused_entries_short_circuit(test_table_s): test_table_s.update_item(Key={'p': p}, AttributeUpdates={'a': {'Value': 1, 'Action': 'PUT'}}) # If short-circuit evaluation is done for ConditionExpression, it will - # not use #name2 or :val2. But we should't fail this request claiming + # not use #name2 or :val2. But we shouldn't fail this request claiming # these references weren't used... They were used in the expression, # just not in the evaluation. This request *should* work. test_table_s.update_item(Key={'p': p}, diff --git a/test/alternator/test_describe_table.py b/test/alternator/test_describe_table.py index 008d815dc1..a43d553ad8 100644 --- a/test/alternator/test_describe_table.py +++ b/test/alternator/test_describe_table.py @@ -105,7 +105,7 @@ def test_describe_table_provisioned_throughput(test_table): # This is a silly test for the RestoreSummary attribute in DescribeTable - # it should not exist in a table not created by a restore. When testing -# the backup/restore feature, we will have more meaninful tests for the +# the backup/restore feature, we will have more meaningful tests for the # value of this attribute in that case. def test_describe_table_restore_summary(test_table): got = test_table.meta.client.describe_table(TableName=test_table.name)['Table'] diff --git a/test/alternator/test_filter_expression.py b/test/alternator/test_filter_expression.py index 9cd5cf0c8a..5f1e8cbe57 100644 --- a/test/alternator/test_filter_expression.py +++ b/test/alternator/test_filter_expression.py @@ -75,7 +75,7 @@ def test_table_sn_with_data(test_table_sn): # must use KeyCondition or KeyConditionExpression instead. In the first test # we don't use a KeyCondition at all and get a generic error message about # Query always needing one. In the second test we do have a KeyCondition plus -# a (redundent) FilterExpression on the key attribute, and that isn't allowed +# a (redundant) FilterExpression on the key attribute, and that isn't allowed # either. def test_filter_expression_partition_key_1(test_table_sn_with_data): table, p, items = test_table_sn_with_data @@ -683,7 +683,7 @@ def test_filter_expression_and_projection_expression(test_table): # Note that: # 1. Exactly one item matches the filter on x # 2. The returned record for that item will include *only* the attribute y - # as requestd by ProjectionExpression. It won't include x - it was just + # as requested by ProjectionExpression. It won't include x - it was just # needed for the filter, but didn't appear in ProjectionExpression. expected_items = [{'y': 'horse'}] assert(got_items == expected_items) diff --git a/test/alternator/test_gsi.py b/test/alternator/test_gsi.py index 309db1bc84..6e1aba6452 100644 --- a/test/alternator/test_gsi.py +++ b/test/alternator/test_gsi.py @@ -22,7 +22,7 @@ from util import create_test_table, random_string, full_scan, full_query, multis # secondary indexes within a fraction of a second, under normal conditions" # and indeed, in practice, the tests here almost always succeed without a # retry. -# However, it is worthwhile to differenciate between the case where the +# However, it is worthwhile to differentiate between the case where the # result set is not *yet* complete (which is ok, and requires retry), and # the case that the result set has wrong data. In the latter case, the # test will surely fail and no amount of retry will help, so we should diff --git a/test/alternator/test_item.py b/test/alternator/test_item.py index 99fae76b38..8abbcd2b57 100644 --- a/test/alternator/test_item.py +++ b/test/alternator/test_item.py @@ -515,7 +515,7 @@ def test_update_item_delete(test_table_s): with pytest.raises(ClientError, match='ValidationException.*empty'): test_table_s.update_item(Key={'p': p}, AttributeUpdates={'a': {'Action': 'DELETE', 'Value': set([])}}) - # Deleting all the elments from a set doesn't leave an empty set + # Deleting all the elements from a set doesn't leave an empty set # (which DynamoDB doesn't allow) but rather deletes the attribute: test_table_s.update_item(Key={'p': p}, AttributeUpdates={'a': {'Action': 'DELETE', 'Value': set([1, 2, 3])}}) @@ -743,7 +743,7 @@ def test_unused_entries_no_expression(test_table_s): def test_null_in_string(test_table_s): p = random_string() + '\x00' + random_string() val = random_string() + '\x00' + random_string() - # sanity check: varify that Python actually put the null in the strings... + # sanity check: verify that Python actually put the null in the strings... assert 0 in p.encode('utf-8') assert 0 in val.encode('utf-8') test_table_s.put_item(Item={'p': p, 'val': val}) @@ -752,7 +752,7 @@ def test_null_in_string(test_table_s): def test_null_in_bytes(test_table_b): p = random_bytes() + bytes([0]) + random_bytes() val = random_bytes() + bytes([0]) + random_bytes() - # sanity check: varify that Python actually put the null in the bytes... + # sanity check: verify that Python actually put the null in the bytes... assert 0 in p assert 0 in val test_table_b.put_item(Item={'p': p, 'val': val}) diff --git a/test/alternator/test_key_condition_expression.py b/test/alternator/test_key_condition_expression.py index a00145209e..cb178397c3 100644 --- a/test/alternator/test_key_condition_expression.py +++ b/test/alternator/test_key_condition_expression.py @@ -245,7 +245,7 @@ def test_key_condition_expression_parser(test_table_sn_with_sorted_partition): ExpressionAttributeValues={':p': p, ':c': 3}) expected_items = [item for item in items if item['c'] == 3] assert(got_items == expected_items) - # Strangely, although one pair of unnecesary parentheses are allowed + # Strangely, although one pair of unnecessary parentheses are allowed # in each level, DynamoDB forbids more than one - it refuses to accept # the expression ((c=:c) AND ((p=:p))) with one too many redundant levels # of parentheses. However, we chose not to implement this extra check diff --git a/test/alternator/test_limits.py b/test/alternator/test_limits.py index f569be7bda..a6a9c3dcc4 100644 --- a/test/alternator/test_limits.py +++ b/test/alternator/test_limits.py @@ -100,7 +100,7 @@ def test_limit_attribute_length_key_good(dynamodb): # Attribute length test 4: Test that *key* attribute names more than 255 # characters are not allowed - not for hash key and not for range key. -# Strangely, this limitation is not explictly mentioned in the DynamoDB +# Strangely, this limitation is not explicitly mentioned in the DynamoDB # documentation - which only mentions that SI keys are limited to 255 bytes, # but forgets to mention base-table keys. # Reproduces issue #9169. @@ -203,7 +203,7 @@ def test_limit_attribute_length_gsi_lsi_bad(dynamodb): pass # Attribute length tests 7,8: In an LSI, projected attribute names are also -# limited to 255 bytes. This is explicilty mentioned in the DynamoDB +# limited to 255 bytes. This is explicitly mentioned in the DynamoDB # documentation. For GSI this is also true (but not explicitly mentioned). # This limitation is only true to attributes *explicitly* projected by name - # attributes projected as part as ALL can be bigger (up to the usual 64KB @@ -498,7 +498,7 @@ def test_deeply_nested_expression_2(test_table_s): # redundant parentheses", and Scylla stops parsing after recursing too # deeply (MAX_DEPTH) and reports "Failed parsing ConditionExpression". # The really important thing is Scylla doesn't crash on this expression (as -# it used to before implementating MAX_DEPTH). +# it used to before implementing MAX_DEPTH). def test_deeply_nested_expression_3(test_table_s): # (((((((((((((((aTWCS with no TTL defined + // Scenario 1: STCS->TWCS with no TTL defined e.execute_cql("CREATE TABLE tbl (a int PRIMARY KEY, b int);").get(); e.execute_cql("ALTER TABLE tbl WITH compaction = {'class': 'TimeWindowCompactionStrategy'};").get(); BOOST_REQUIRE(e.local_db().has_schema("ks", "tbl")); - // Cenario 2: STCS->TWCS with small TTL. Note: TWCS default window size is 1 day (86400s) + // Scenario 2: STCS->TWCS with small TTL. Note: TWCS default window size is 1 day (86400s) e.execute_cql("CREATE TABLE tbl2 (a int PRIMARY KEY, b int) WITH default_time_to_live = 60;").get(); e.execute_cql("ALTER TABLE tbl2 WITH compaction = {'class': 'TimeWindowCompactionStrategy'};").get(); BOOST_REQUIRE(e.local_db().has_schema("ks", "tbl2")); - // Cenario 3: STCS->TWCS with large TTL value + // Scenario 3: STCS->TWCS with large TTL value e.execute_cql("CREATE TABLE tbl3 (a int PRIMARY KEY, b int) WITH default_time_to_live = 8640000;").get(); BOOST_REQUIRE(e.local_db().has_schema("ks", "tbl3")); BOOST_REQUIRE_THROW(e.execute_cql("ALTER TABLE tbl3 WITH compaction = {'class': 'TimeWindowCompactionStrategy'};").get(), exceptions::configuration_exception); - // Cenario 4: TWCS table with small to large TTL + // Scenario 4: TWCS table with small to large TTL e.execute_cql("CREATE TABLE tbl4 (a int PRIMARY KEY, b int) WITH compaction = " "{'class': 'TimeWindowCompactionStrategy'} AND default_time_to_live = 60;").get(); BOOST_REQUIRE(e.local_db().has_schema("ks", "tbl4")); BOOST_REQUIRE_THROW(e.execute_cql("ALTER TABLE tbl4 WITH default_time_to_live = 86400000;").get(), exceptions::configuration_exception); - // Cenario 5: No TTL TWCS to large TTL and then small TTL + // Scenario 5: No TTL TWCS to large TTL and then small TTL e.execute_cql("CREATE TABLE tbl5 (a int PRIMARY KEY, b int) WITH compaction = " "{'class': 'TimeWindowCompactionStrategy'}").get(); BOOST_REQUIRE(e.local_db().has_schema("ks", "tbl5")); BOOST_REQUIRE_THROW(e.execute_cql("ALTER TABLE tbl5 WITH default_time_to_live = 86400000;").get(), exceptions::configuration_exception); e.execute_cql("ALTER TABLE tbl5 WITH default_time_to_live = 60;").get(); - // Cenario 6: twcs_max_window_count LiveUpdate - Decrease TTL + // Scenario 6: twcs_max_window_count LiveUpdate - Decrease TTL e.execute_cql("UPDATE system.config SET value='0' WHERE name='twcs_max_window_count';").get(); e.execute_cql("CREATE TABLE tbl6 (a int PRIMARY KEY, b int) WITH compaction = " "{'class': 'TimeWindowCompactionStrategy'} AND default_time_to_live = 86400000;").get(); @@ -193,7 +193,7 @@ SEASTAR_TEST_CASE(test_twcs_restrictions_mixed) { e.execute_cql("UPDATE system.config SET value='50' WHERE name='twcs_max_window_count';").get(); e.execute_cql("ALTER TABLE tbl6 WITH default_time_to_live = 60;").get(); - // Cenario 7: twcs_max_window_count LiveUpdate - Switch CompactionStrategy + // Scenario 7: twcs_max_window_count LiveUpdate - Switch CompactionStrategy e.execute_cql("UPDATE system.config SET value='0' WHERE name='twcs_max_window_count';").get(); e.execute_cql("CREATE TABLE tbl7 (a int PRIMARY KEY, b int) WITH compaction = " "{'class': 'TimeWindowCompactionStrategy'} AND default_time_to_live = 86400000;").get(); @@ -201,13 +201,13 @@ SEASTAR_TEST_CASE(test_twcs_restrictions_mixed) { e.execute_cql("UPDATE system.config SET value='50' WHERE name='twcs_max_window_count';").get(); e.execute_cql("ALTER TABLE tbl7 WITH compaction = {'class': 'SizeTieredCompactionStrategy'}").get(); - // Cenario 8: No TTL TWCS table to STCS + // Scenario 8: No TTL TWCS table to STCS e.execute_cql("CREATE TABLE tbl8 (a int PRIMARY KEY, b int) WITH compaction = " "{'class': 'TimeWindowCompactionStrategy'};").get(); BOOST_REQUIRE(e.local_db().has_schema("ks" ,"tbl8")); e.execute_cql("ALTER TABLE tbl8 WITH compaction = {'class': 'SizeTieredCompactionStrategy'};").get(); - // Cenario 9: Large TTL TWCS table, modify attribute other than compaction and default_time_to_live + // Scenario 9: Large TTL TWCS table, modify attribute other than compaction and default_time_to_live e.execute_cql("UPDATE system.config SET value='0' WHERE name='twcs_max_window_count';").get(); e.execute_cql("CREATE TABLE tbl9 (a int PRIMARY KEY, b int) WITH compaction = " "{'class': 'TimeWindowCompactionStrategy'} AND default_time_to_live = 86400000;").get(); @@ -215,13 +215,13 @@ SEASTAR_TEST_CASE(test_twcs_restrictions_mixed) { e.execute_cql("UPDATE system.config SET value='50' WHERE name='twcs_max_window_count';").get(); e.execute_cql("ALTER TABLE tbl9 WITH gc_grace_seconds = 0;").get(); - // Cenario 10: Large TTL STCS table, fail to switch to TWCS with no TTL + // Scenario 10: Large TTL STCS table, fail to switch to TWCS with no TTL e.execute_cql("CREATE TABLE tbl10 (a int PRIMARY KEY, b int) WITH default_time_to_live = 8640000;").get(); BOOST_REQUIRE(e.local_db().has_schema("ks", "tbl10")); BOOST_REQUIRE_THROW(e.execute_cql("ALTER TABLE tbl10 WITH compaction = {'class': 'TimeWindowCompactionStrategy'};").get(), exceptions::configuration_exception); e.execute_cql("ALTER TABLE tbl10 WITH compaction = {'class': 'TimeWindowCompactionStrategy'} AND default_time_to_live = 0;").get(); - // Cenario 11: Ensure default_time_to_live updates reference existing table properties + // Scenario 11: Ensure default_time_to_live updates reference existing table properties e.execute_cql("CREATE TABLE tbl11 (a int PRIMARY KEY, b int) WITH compaction = " "{'class': 'TimeWindowCompactionStrategy', 'compaction_window_size': '1', " "'compaction_window_unit': 'MINUTES'} AND default_time_to_live=3000;").get(); @@ -231,7 +231,7 @@ SEASTAR_TEST_CASE(test_twcs_restrictions_mixed) { "'compaction_window_size': '2', 'compaction_window_unit': 'MINUTES'};").get(); e.execute_cql("ALTER TABLE tbl11 WITH default_time_to_live=3600;").get(); - // Cenario 12: Ensure that window sizes <= 0 are forbidden + // Scenario 12: Ensure that window sizes <= 0 are forbidden BOOST_REQUIRE_THROW(e.execute_cql("CREATE TABLE tbl12 (a int PRIMARY KEY, b int) WITH compaction = " "{'class': 'TimeWindowCompactionStrategy', 'compaction_window_size': '0'};").get(), exceptions::configuration_exception); BOOST_REQUIRE_THROW(e.execute_cql("CREATE TABLE tbl12 (a int PRIMARY KEY, b int) WITH compaction = " @@ -276,7 +276,7 @@ SEASTAR_TEST_CASE(test_list_elements_validation) { } }; e.execute_cql("CREATE TABLE tbl (a int, b list, PRIMARY KEY (a))").get(); - test_inline("definietly not a date value", true); + test_inline("definitely not a date value", true); test_inline("2015-05-03", false); e.execute_cql("CREATE TABLE tbl2 (a int, b list, PRIMARY KEY (a))").get(); auto id = e.prepare("INSERT INTO tbl2 (a, b) VALUES(?, ?)").get0(); @@ -310,7 +310,7 @@ SEASTAR_TEST_CASE(test_set_elements_validation) { } }; e.execute_cql("CREATE TABLE tbl (a int, b set, PRIMARY KEY (a))").get(); - test_inline("definietly not a date value", true); + test_inline("definitely not a date value", true); test_inline("2015-05-03", false); e.execute_cql("CREATE TABLE tbl2 (a int, b set, PRIMARY KEY (a))").get(); auto id = e.prepare("INSERT INTO tbl2 (a, b) VALUES(?, ?)").get0(); @@ -347,7 +347,7 @@ SEASTAR_TEST_CASE(test_map_elements_validation) { } }; e.execute_cql("CREATE TABLE tbl (a int, b map, PRIMARY KEY (a))").get(); - test_inline("definietly not a date value", true); + test_inline("definitely not a date value", true); test_inline("2015-05-03", false); e.execute_cql("CREATE TABLE tbl2 (a int, b map, PRIMARY KEY (a))").get(); auto id = e.prepare("INSERT INTO tbl2 (a, b) VALUES(?, ?)").get0(); @@ -396,7 +396,7 @@ SEASTAR_TEST_CASE(test_in_clause_validation) { } }; e.execute_cql("CREATE TABLE tbl (p1 int, c1 int, r1 date, PRIMARY KEY (p1, c1,r1))").get(); - test_inline("definietly not a date value", true); + test_inline("definitely not a date value", true); test_inline("2015-05-03", false); e.execute_cql("CREATE TABLE tbl2 (p1 int, c1 int, r1 text, PRIMARY KEY (p1, c1,r1))").get(); auto id = e.prepare("SELECT r1 FROM tbl2 WHERE (c1,r1) IN ? ALLOW FILTERING").get0(); @@ -481,7 +481,7 @@ SEASTAR_TEST_CASE(test_tuple_elements_validation) { } }; e.execute_cql("CREATE TABLE tbl (a int, b tuple, PRIMARY KEY (a))").get(); - test_inline("definietly not a date value", true); + test_inline("definitely not a date value", true); test_inline("2015-05-03", false); e.execute_cql("CREATE TABLE tbl2 (a int, b tuple, PRIMARY KEY (a))").get(); auto id = e.prepare("INSERT INTO tbl2 (a, b) VALUES(?, ?)").get0(); @@ -556,7 +556,7 @@ SEASTAR_TEST_CASE(test_bound_var_in_collection_literal) { }); } -/// The nubmer of distinct values in a list is limited. Test the +/// The number of distinct values in a list is limited. Test the // limit. SEASTAR_TEST_CASE(test_list_append_limit) { return do_with_cql_env_thread([](cql_test_env& e) { @@ -3401,7 +3401,7 @@ public: static const int total_num_of_values = constexpr_int_pow(Base, Digits); /** - * Consructor for the testcase + * Constructor for the testcase * @param gt_range - the tuple for the greater than part of the expression * as a vector of integers.An empty vector indicates no grater than * part. @@ -3497,11 +3497,11 @@ public: /** * Maps back from integer space to tuple space. - * There can be more than one tuple maped to the same int. + * There can be more than one tuple mapped to the same int. * There will never be more than one tuple of a certain size - * that is maped to the same int. - * For example: (1) and (1,0) will be maped to the same integer, - * but no other tuple of size 1 or 2 will be maped to this int. + * that is mapped to the same int. + * For example: (1) and (1,0) will be mapped to the same integer, + * but no other tuple of size 1 or 2 will be mapped to this int. * @param val - the value to map * @param num_componnents - the size of the produced tuple. * @return the tuple of the requested size. @@ -3603,15 +3603,15 @@ SEASTAR_TEST_CASE(test_select_with_mixed_order_table) { slice_test_type::column_ordering_for_results::DESC, slice_test_type::column_ordering_for_results::ASC, }; - // no overlap in componnents equal num of componnents - (b,c,d,e) >/>= (0,1,2,3) and (b,c,d,e) />= (0,1,2,3) and (b,c,d,e) />= (0,1,2,3) and (b,c,d,e) />= (0,1,2,3) and (b,c,d,e) />= (0,1,2,3) and (b,c,d,e) />= (0,1,2,3) and (b,c,d,e) />= (0,1,2,3) and (b,c) />= (0,1,2,3) and (b,c) />= (0,1,2,3) and (b,c) />= (0,1,2,3) and (b,c) />= expression - (b,c) >/>= (0,1) and (b,c,d,e) />= expression - (b,c) >/>= (0,1) and (b,c,d,e) />= expression - (b,c) >/>= (0,1) and (b,c,d,e) />= 1 expression - (b) >/>= (1) generate_with_inclusiveness_permutations({1},{}); diff --git a/test/boost/dirty_memory_manager_test.cc b/test/boost/dirty_memory_manager_test.cc index ad790e0d3c..4ad78b1071 100644 --- a/test/boost/dirty_memory_manager_test.cc +++ b/test/boost/dirty_memory_manager_test.cc @@ -406,7 +406,7 @@ SEASTAR_TEST_CASE(test_region_groups_basic_throttling_active_reclaim_worst_offen // allocate three regions with three different sizes (segment boundary must be used due to // LSA granularity). // - // The function can only be executed when all three are freed - which exercises continous + // The function can only be executed when all three are freed - which exercises continuous // reclaim, but they must be freed in descending order of their sizes test_reclaimer simple(logalloc::segment_size); diff --git a/test/boost/double_decker_test.cc b/test/boost/double_decker_test.cc index 4378f5ac0d..86e8fc8a95 100644 --- a/test/boost/double_decker_test.cc +++ b/test/boost/double_decker_test.cc @@ -230,7 +230,7 @@ void compare_with_set(collection& c, oracle& s) { BOOST_REQUIRE(j != c.end() && *j == *i); } - /* Both iterators must coinside */ + /* Both iterators must coincide */ auto i = c.begin(); auto j = s.begin(); diff --git a/test/boost/duration_test.cc b/test/boost/duration_test.cc index 5b284dd9a1..387da40eb6 100644 --- a/test/boost/duration_test.cc +++ b/test/boost/duration_test.cc @@ -27,7 +27,7 @@ constexpr auto ns_per_s = ns_per_ms * 1000L; constexpr auto ns_per_m = ns_per_s * 60L; constexpr auto ns_per_h = ns_per_m * 60L; -// Normally we want to be explict, but brevity is nice for tests. +// Normally we want to be explicit, but brevity is nice for tests. constexpr cql_duration make_duration(months_counter::value_type m, days_counter::value_type d, nanoseconds_counter::value_type ns) noexcept { diff --git a/test/boost/expr_test.cc b/test/boost/expr_test.cc index bb9f10b640..c9f62c7deb 100644 --- a/test/boost/expr_test.cc +++ b/test/boost/expr_test.cc @@ -3033,7 +3033,7 @@ raw_value eval_conj(std::vector elements) { return evaluate(conjunction{.children = conj_children}, evaluation_inputs{}); }; -// Evaluate all possible two-element conjunctions containting true, false and null. +// Evaluate all possible two-element conjunctions containing true, false and null. BOOST_AUTO_TEST_CASE(evaluate_conjunction_two_elements) { raw_value true_val = make_bool_raw(true); raw_value false_val = make_bool_raw(false); @@ -3052,7 +3052,7 @@ BOOST_AUTO_TEST_CASE(evaluate_conjunction_two_elements) { BOOST_REQUIRE_EQUAL(eval_conj({null_val, null_val}), null_val); } -// Evaluate all possible three-element conjunctions containting true, false and null. +// Evaluate all possible three-element conjunctions containing true, false and null. BOOST_AUTO_TEST_CASE(evaluate_conjunction_three_elements) { raw_value true_val = make_bool_raw(true); raw_value false_val = make_bool_raw(false); @@ -3134,7 +3134,7 @@ BOOST_AUTO_TEST_CASE(evaluate_conjunction_one_empty) { BOOST_REQUIRE_THROW(evaluate(conj_one_empty, evaluation_inputs{}), exceptions::invalid_request_exception); } -// Evaluating 'true AND true AND true AND EMPTY AND ...' should throw an erorr +// Evaluating 'true AND true AND true AND EMPTY AND ...' should throw an error BOOST_AUTO_TEST_CASE(evaluate_conjunction_with_empty) { expression conj_with_empty = conjunction{.children = {make_bool_const(true), make_bool_const(true), make_bool_const(true), @@ -3621,7 +3621,7 @@ enum struct expected_rhs_type { float_in_list, // list multi_column_tuple_in_list, - // IS_NOT alows only NULL as the RHS, everything else is invalid + // IS_NOT allows only NULL as the RHS, everything else is invalid is_not_null_rhs }; @@ -3640,7 +3640,7 @@ std::vector get_invalid_rhs_values(expected_rhs_type expected_rhs) { make_float_untyped("45.67"), }}, // A tuple with too many elements for multi_column_tuple. - // A tuple with too little elements doesn't cause an error - CQL accepts it, the missing fields are assummed to + // A tuple with too little elements doesn't cause an error - CQL accepts it, the missing fields are assumed to // be null. tuple_constructor{.elements = { diff --git a/test/boost/filtering_test.cc b/test/boost/filtering_test.cc index 7bb9aa4fab..b3f7bd6bf3 100644 --- a/test/boost/filtering_test.cc +++ b/test/boost/filtering_test.cc @@ -1097,7 +1097,7 @@ SEASTAR_TEST_CASE(test_filtering) { // Notice the with_serialized_columns_count() check before the set comparison. // Since we are dealing with the result set before serializing to the client, // there is an extra column that is used for the filtering, this column will - // not be present in the responce to the client and with_serialized_columns_count() + // not be present in the response to the client and with_serialized_columns_count() // verifies exactly that. // test filtering on partition keys diff --git a/test/boost/group0_cmd_merge_test.cc b/test/boost/group0_cmd_merge_test.cc index d5cf700790..0e88500cec 100644 --- a/test/boost/group0_cmd_merge_test.cc +++ b/test/boost/group0_cmd_merge_test.cc @@ -88,7 +88,7 @@ SEASTAR_TEST_CASE(test_group0_cmd_merge) { std::vector cms; size_t size = 0; auto muts = service::prepare_keyspace_drop_announcement(env.local_db(), "ks", api::new_timestamp()).get0(); - // Maximum mutation size is 1/3 of commitlog segment size wich we set + // Maximum mutation size is 1/3 of commitlog segment size which we set // to 1M. Make one command a little bit larger than third of the max size. while (size < 150*1024) { for (auto&& m : muts) { @@ -105,9 +105,9 @@ SEASTAR_TEST_CASE(test_group0_cmd_merge) { group0.add_entry(cmd, raft::wait_type::applied, nullptr), group0.add_entry(cmd, raft::wait_type::applied, nullptr), group0.add_entry(cmd, raft::wait_type::applied, nullptr)); - // Sleep is needed for all the entreis added above to hit the log + // Sleep is needed for all the entries added above to hit the log seastar::sleep(std::chrono::milliseconds(100)).get(); - // After unpause all entreis added above will be committed and applied together + // After unpause all entries added above will be committed and applied together utils::get_local_injector().disable("fsm::poll_output/pause"); f.get(); // Wait for apply to complete // Thete should be two calls to migration manager since two out of diff --git a/test/boost/loading_cache_test.cc b/test/boost/loading_cache_test.cc index 653247e2a3..544b18f32f 100644 --- a/test/boost/loading_cache_test.cc +++ b/test/boost/loading_cache_test.cc @@ -211,7 +211,7 @@ SEASTAR_TEST_CASE(test_loading_cache_disable_and_enable) { sleep(150ms).get(); BOOST_REQUIRE_EQUAL(load_count, 0); - // Reenable + // Re-enable load_count = 0; loading_cache.update_config({num_loaders, 1h, 50ms}); sleep(50ms).get(); diff --git a/test/boost/locator_topology_test.cc b/test/boost/locator_topology_test.cc index 71e7e36270..e3c5f2121b 100644 --- a/test/boost/locator_topology_test.cc +++ b/test/boost/locator_topology_test.cc @@ -163,7 +163,7 @@ SEASTAR_THREAD_TEST_CASE(test_update_node) { BOOST_REQUIRE(topo.get_location(ep3) == dc_rack3); BOOST_REQUIRE_EQUAL(node->get_state(), locator::node::state::being_decommissioned); - // In state::left the ndoe will remain indexed only by its host_id + // In state::left the node will remain indexed only by its host_id node = topo.update_node(mutable_node, std::nullopt, std::nullopt, std::nullopt, locator::node::state::left); BOOST_REQUIRE_EQUAL(topo.find_node(id1), node); BOOST_REQUIRE_EQUAL(topo.find_node(ep1), nullptr); diff --git a/test/boost/logalloc_test.cc b/test/boost/logalloc_test.cc index 37c3db253a..8dfea43491 100644 --- a/test/boost/logalloc_test.cc +++ b/test/boost/logalloc_test.cc @@ -628,7 +628,7 @@ SEASTAR_THREAD_TEST_CASE(test_decay_reserves) { reclaims = 0; // Allocate a big chunk to force the reserve to increase, - // and immediately deallocate it (to keep the lru homogenous + // and immediately deallocate it (to keep the lru homogeneous // and the test simple) alloc_section(region, [&] { with_allocator(region.allocator(), [&] { diff --git a/test/boost/memtable_test.cc b/test/boost/memtable_test.cc index efb6493425..3e16c2dc3e 100644 --- a/test/boost/memtable_test.cc +++ b/test/boost/memtable_test.cc @@ -157,7 +157,7 @@ SEASTAR_TEST_CASE(test_memtable_with_many_versions_conforms_to_mutation_source_r } SEASTAR_TEST_CASE(test_memtable_flush_reader) { - // Memtable flush reader is severly limited, it always assumes that + // Memtable flush reader is severely limited, it always assumes that // the full partition range is being read and that // streamed_mutation::forwarding is set to no. Therefore, we cannot use // run_mutation_source_tests() to test it. diff --git a/test/boost/mutation_reader_test.cc b/test/boost/mutation_reader_test.cc index cfe2755151..1f56de0736 100644 --- a/test/boost/mutation_reader_test.cc +++ b/test/boost/mutation_reader_test.cc @@ -1834,7 +1834,7 @@ SEASTAR_THREAD_TEST_CASE(test_stopping_reader_with_pending_read_ahead) { bool buffer_filled = false; auto destroyed_after_close = reader.close().then([&] { - // close shuold wait on readahead and complete + // close should wait on readahead and complete // only after `remote_control->buffer_filled.set_value()` // is executed below. BOOST_REQUIRE(buffer_filled); @@ -2049,7 +2049,7 @@ SEASTAR_THREAD_TEST_CASE(test_multishard_combining_reader_only_reads_from_needed // with the normal reading. If the multishard reader is destroyed before the // synchronization happens the fiber is orphaned. Test that the fiber is // prepared for this possibility and doesn't attempt to read any members of any -// destoyed objects causing memory errors. +// destroyed objects causing memory errors. // // Theory of operation: // 1) First read a full buffer from shard 0; diff --git a/test/boost/mutation_test.cc b/test/boost/mutation_test.cc index 278646cfff..f68f80e7a1 100644 --- a/test/boost/mutation_test.cc +++ b/test/boost/mutation_test.cc @@ -1020,7 +1020,7 @@ SEASTAR_TEST_CASE(test_apply_monotonically_is_monotonic) { bool use_second = which++ % 2; mutation& dst = use_second ? second : target; dst.partition().set_continuity(s, position_range::from_range(ck_range), is_continuous::yes); - // Continutiy merging rules mandate that continuous range in the newer verison + // Continutiy merging rules mandate that continuous range in the newer version // contains all rows which are in the old versions. if (use_second) { second.partition().apply(s, target.partition().sliced(s, {ck_range}), app_stats); diff --git a/test/boost/secondary_index_test.cc b/test/boost/secondary_index_test.cc index 43f2c9f6bb..b6e124a2a8 100644 --- a/test/boost/secondary_index_test.cc +++ b/test/boost/secondary_index_test.cc @@ -360,7 +360,7 @@ SEASTAR_TEST_CASE(test_index_with_partition_key) { }); }); - // And it's also sufficient if only full parition key + clustering key prefix is present + // And it's also sufficient if only full partition key + clustering key prefix is present eventually([&] { auto res = e.execute_cql("SELECT * from tab WHERE a = 1 and b = 2 and c = 3 and e = 5").get0(); assert_that(res).is_rows().with_rows({ diff --git a/test/boost/sstable_3_x_test.cc b/test/boost/sstable_3_x_test.cc index 7dea426c4a..150c556eae 100644 --- a/test/boost/sstable_3_x_test.cc +++ b/test/boost/sstable_3_x_test.cc @@ -3343,7 +3343,7 @@ static void write_mut_and_validate_version(test_env& env, schema_ptr s, const ss sstable_version_types version, std::vector min_components, std::vector max_components) { // FIXME This used to `write_and_compare_sstables()` and to // additionally call `do_validate_stats_metadata()` on the result, - // but cannot now because flat reader version tranforms rearrange + // but cannot now because flat reader version transforms rearrange // range tombstones. Revisit once the reader v2 migration is // complete and those version transforms are gone auto sst = make_sstable_containing(env.make_sstable(s, version), {mut}); diff --git a/test/boost/sstable_compaction_test.cc b/test/boost/sstable_compaction_test.cc index 49d503d228..3cbc6ff126 100644 --- a/test/boost/sstable_compaction_test.cc +++ b/test/boost/sstable_compaction_test.cc @@ -1106,7 +1106,7 @@ SEASTAR_TEST_CASE(tombstone_purge_test) { } { - // check that expired cell will not be purged if it will ressurect overwritten data. + // check that expired cell will not be purged if it will resurrect overwritten data. auto mut1 = make_insert(alpha); auto mut2 = make_expiring(alpha, ttl); @@ -3046,7 +3046,7 @@ SEASTAR_TEST_CASE(partial_sstable_run_filtered_out_test) { }, test_env_config{ .use_uuid = false }); } -// Make sure that a custom tombstone-gced-only writer will be feeded with gc'able tombstone +// Make sure that a custom tombstone-gced-only writer will be fed with gc'able tombstone // from the regular compaction's input sstable. SEASTAR_TEST_CASE(purged_tombstone_consumer_sstable_test) { BOOST_REQUIRE(smp::count == 1); @@ -3182,7 +3182,7 @@ SEASTAR_TEST_CASE(purged_tombstone_consumer_sstable_test) { }); } -/* Make sure data is not ressurrected. +/* Make sure data is not resurrected. sstable 1 with key A and key B and key C sstable 2 with expired (GC'able) tombstone for key A @@ -3195,7 +3195,7 @@ SEASTAR_TEST_CASE(purged_tombstone_consumer_sstable_test) { Result: sstable 1 is alive in the table, whereas sstable 2 is gone. - if key A can be read from table, data was ressurrected. + if key A can be read from table, data was resurrected. */ SEASTAR_TEST_CASE(incremental_compaction_data_resurrection_test) { return test_env::do_with_async([] (test_env& env) { diff --git a/test/boost/sstable_generation_test.cc b/test/boost/sstable_generation_test.cc index e7675cd2c2..e62a05a739 100644 --- a/test/boost/sstable_generation_test.cc +++ b/test/boost/sstable_generation_test.cc @@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE(compare) { const auto uuid = "3fw2_0tj4_46w3k2cpidnirvjy7k"s; const auto id_uuid = sstables::generation_type::from_string(uuid); - // an integer-based identifer should be always greater than a uuid-based one, + // an integer-based identifier should be always greater than a uuid-based one, // so we can find the uuid-based identifier as before BOOST_CHECK_GT(sstables::generation_type(42), id_uuid); BOOST_CHECK_GT(sstables::generation_type(1), id_uuid); diff --git a/test/boost/sstable_mutation_test.cc b/test/boost/sstable_mutation_test.cc index 18bda90d57..05ad3e27af 100644 --- a/test/boost/sstable_mutation_test.cc +++ b/test/boost/sstable_mutation_test.cc @@ -1428,7 +1428,7 @@ SEASTAR_TEST_CASE(test_reading_serialization_header) { std::optional gen; { // SSTable class has way too many responsibilities. In particular, it mixes the reading and - // writting parts. Let's use a separate objects for writing and reading to ensure that nothing + // writing parts. Let's use a separate objects for writing and reading to ensure that nothing // carries over that wouldn't normally be read from disk. auto sst = env.make_sstable(s); gen.emplace(sst->generation()); diff --git a/test/boost/storage_proxy_test.cc b/test/boost/storage_proxy_test.cc index 908ba2dd05..1a40d21938 100644 --- a/test/boost/storage_proxy_test.cc +++ b/test/boost/storage_proxy_test.cc @@ -125,7 +125,7 @@ SEASTAR_THREAD_TEST_CASE(test_split_stats) { // simulating the calling of storage_proxy::on_down, from gossip // on node dropping out. If inside a write operation, we'll pick up // write handlers and to "timeout_cb" on them, which in turn might - // call get_ep_stat, which evenually calls register_metrics for + // call get_ep_stat, which eventually calls register_metrics for // the DC written to. // Point being is that either the above should not happen, or // split_stats should be resilient to being called from different diff --git a/test/boost/types_test.cc b/test/boost/types_test.cc index 2c4b13acd1..a77a26b0e9 100644 --- a/test/boost/types_test.cc +++ b/test/boost/types_test.cc @@ -908,7 +908,7 @@ BOOST_AUTO_TEST_CASE(test_collection_type_compatibility) { auto lf_b = list_type_impl::get_instance(bytes_type, false); test_case tests[] = { - { nc, m__bi, int32_type }, // collection vs. primitiv + { nc, m__bi, int32_type }, // collection vs. primitive { cc, m__bi, m__bi }, // identity { nc, m__bi, m__ib }, // key not compatible { nc, mf_bi, mf_ib }, // " diff --git a/test/cql-pytest/README.md b/test/cql-pytest/README.md index 2d10358c06..bf894ee57a 100644 --- a/test/cql-pytest/README.md +++ b/test/cql-pytest/README.md @@ -19,7 +19,7 @@ temporary directory which is automatically deleted when the test ends. "run" automatically picks the most recently compiled version of Scylla in `build/*/scylla` - but this choice of Scylla executable can be overridden with the `SCYLLA` environment variable. "run-cassandra" defaults to running the -command `cassandra` from the user's path, but this can be overriden by setting +command `cassandra` from the user's path, but this can be overridden by setting the `CASSANDRA` environment variable to the path of the `cassandra` script, e.g., `export CASSANDRA=$HOME/apache-cassandra-3.11.10/bin/cassandra`. A few of the tests also require the `nodetool` when running on Cassandra - @@ -147,7 +147,7 @@ and practices be followed when writing new tests: please resist the urge to add more and more of these utility functions. Utility functions are bad for several reasons. First, they make it harder to read tests - any reader will understand what "cql.execute(...)" - does, but not be familiar with dozens of obscure utilty functions. + does, but not be familiar with dozens of obscure utility functions. Second, when a utility function is written for the benefit of a single test, it is often much less general than its author thought, and when it comes time to reuse it in a second test, it turns out it needs to be diff --git a/test/cql-pytest/cassandra_tests/functions/cast_fcts_test.py b/test/cql-pytest/cassandra_tests/functions/cast_fcts_test.py index d3a1786091..ffbdb32fd6 100644 --- a/test/cql-pytest/cassandra_tests/functions/cast_fcts_test.py +++ b/test/cql-pytest/cassandra_tests/functions/cast_fcts_test.py @@ -94,12 +94,12 @@ def testNumericCastsInSelectionClause(cql, test_keyspace, cassandra_bug): "CAST(i AS double) FROM %s"), row(1.0, 2.0, 3.0, 4.0, c_float(5.2).value, 6.3, 6.3, 4.0, None)) - # Cassandra has a bug here (CASSANDRA-18647), so this test was modifed + # Cassandra has a bug here (CASSANDRA-18647), so this test was modified # from the original and fails on Cassandra and marked cassandra_bug: # When the "float" (32-bit) number 5.2 is converted to "decimal", # Cassandra wrongly expands it to double and becomes 5.199999809265137, # and only then converted to decimal with all those silly extra digits. - # Scylla, correctly, only keeps the relevant digits for the orignal + # Scylla, correctly, only keeps the relevant digits for the original # float - 5.2. assertRows(execute(cql, table, "SELECT CAST(a AS decimal), " + "CAST(b AS decimal), " + diff --git a/test/cql-pytest/cassandra_tests/validation/entities/collections_test.py b/test/cql-pytest/cassandra_tests/validation/entities/collections_test.py index 2ee1011745..f5c5b6e7ae 100644 --- a/test/cql-pytest/cassandra_tests/validation/entities/collections_test.py +++ b/test/cql-pytest/cassandra_tests/validation/entities/collections_test.py @@ -1474,7 +1474,7 @@ def testNestedAccessWithNestedMap(cql, test_keyspace): def testInsertingCollectionsWithInvalidElements(cql, test_keyspace): with create_table(cql, test_keyspace, "(k int PRIMARY KEY, s frozen>>)") as table: - # Unfortunatly, the Python driver has its own checking of the prepared + # Unfortunately, the Python driver has its own checking of the prepared # statement bound parameters, so I commented out these tests. #assert_invalid_message(cql, table, "Invalid remaining data after end of tuple value", # "INSERT INTO %s (k, s) VALUES (0, ?)", diff --git a/test/cql-pytest/cassandra_tests/validation/entities/json_test.py b/test/cql-pytest/cassandra_tests/validation/entities/json_test.py index 0bd9b773f4..9df6630fe1 100644 --- a/test/cql-pytest/cassandra_tests/validation/entities/json_test.py +++ b/test/cql-pytest/cassandra_tests/validation/entities/json_test.py @@ -613,7 +613,7 @@ def testFromJsonFct(cql, test_keyspace): # Unlike all the other cases of unsuccessful fromJson() parsing which return FunctionFailure, # in this specific case Cassandra returns InvalidQuery. I don't know why, and I don't think - # Scylla needs to reproduce this ideosyncracy. So let's allow both. + # Scylla needs to reproduce this idiosyncrasy. So let's allow both. assert_invalid_throw(cql, table, (FunctionFailure, InvalidRequest), "INSERT INTO %s (k, durationval) VALUES (?, fromJson(?))", 0, "\"xyz\"") @@ -1118,7 +1118,7 @@ def testInsertJsonSyntaxWithCollections(cql, test_keyspace): execute(cql, table, "INSERT INTO %s JSON ?", "{\"k\": 0, \"lf\": [1, 2, 3]}") assert_rows(execute(cql, table, "SELECT k, lf FROM %s"), [0, [1, 2, 3]]) -# Reproduces issus #8087 +# Reproduces issue #8087 @pytest.mark.xfail(reason="issue #8087") def testInsertJsonSyntaxWithNonNativeMapKeys(cql, test_keyspace): # JSON doesn't allow non-string keys, so we accept string representations of any type as map keys and diff --git a/test/cql-pytest/cassandra_tests/validation/entities/secondary_index_test.py b/test/cql-pytest/cassandra_tests/validation/entities/secondary_index_test.py index c8de00e8f0..86f9ed54fe 100644 --- a/test/cql-pytest/cassandra_tests/validation/entities/secondary_index_test.py +++ b/test/cql-pytest/cassandra_tests/validation/entities/secondary_index_test.py @@ -12,7 +12,7 @@ # In Scylla, where secondary indexes are implemented using materialized # views, this is *not* always the case - an index write may be asynchronous # and may not be available for read immediately after the base write. -# Neverthless, there are situations where Scylla's MV (and SI) writes are +# Nevertheless, there are situations where Scylla's MV (and SI) writes are # guaranteed synchronous. One of them is when N=RF, or in particular, when # N=1. In this case, the base and view replica are always the same node, # so writes can be done synchronously - and Scylla does guarantee this. @@ -1016,7 +1016,7 @@ def testIndexOnNonFrozenUDT(cql, test_keyspace): with create_type(cql, test_keyspace, "(a int)") as t: with create_table(cql, test_keyspace, f"(k int PRIMARY KEY, v {t})") as table: assert_invalid_message(cql, table, "index on non-frozen", "CREATE INDEX ON %s (v)") - # Cassandra and Scylla focus on different parts of the erro + # Cassandra and Scylla focus on different parts of the error # below - Cassandra complains that a because this is not a # collection keys()/values() cannot be supported, while Scylla # complains that this is an unfrozen UDT so it cannot be indexed. diff --git a/test/cql-pytest/cassandra_tests/validation/entities/static_columns_test.py b/test/cql-pytest/cassandra_tests/validation/entities/static_columns_test.py index 114406a4f7..f240e042b6 100644 --- a/test/cql-pytest/cassandra_tests/validation/entities/static_columns_test.py +++ b/test/cql-pytest/cassandra_tests/validation/entities/static_columns_test.py @@ -54,13 +54,13 @@ def testStaticColumns(cql, test_keyspace): assert_rows(execute(cql, table, "SELECT p, s FROM %s WHERE k=0 AND p=1"), [1, 24]) assert_rows(execute(cql, table, "SELECT k, p, s FROM %s WHERE k=0 AND p=1"), [0, 1, 24]) - # Check that deleting a row don't implicitely deletes statics + # Check that deleting a row don't implicitly deletes statics execute(cql, table, "DELETE FROM %s WHERE k=0 AND p=0") if force_flush: flush(cql, table) assert_rows(execute(cql, table, "SELECT * FROM %s"), [0, 1, 24, 1]) - # But that explicitely deleting the static column does remove it + # But that explicitly deleting the static column does remove it execute(cql, table, "DELETE s FROM %s WHERE k=0") if force_flush: flush(cql, table) diff --git a/test/cql-pytest/cassandra_tests/validation/operations/alter_test.py b/test/cql-pytest/cassandra_tests/validation/operations/alter_test.py index 3a022be271..bcaa731d3e 100644 --- a/test/cql-pytest/cassandra_tests/validation/operations/alter_test.py +++ b/test/cql-pytest/cassandra_tests/validation/operations/alter_test.py @@ -113,7 +113,7 @@ def testDropStaticWithTimestamp(cql, test_keyspace): execute(cql, table, "ALTER TABLE %s DROP todrop USING TIMESTAMP 20000") execute(cql, table, "ALTER TABLE %s ADD todrop int static") execute(cql, table, "INSERT INTO %s (id, c1, v1, todrop) VALUES (?, ?, ?, ?) USING TIMESTAMP ?", 1, 100, 100, 100, 30000) - # static column value with largest timestmap will be available again + # static column value with largest timestamp will be available again assert_rows(execute(cql, table, "SELECT id, c1, v1, todrop FROM %s"), [1, 0, 0, 4], [1, 1, 1, 4], diff --git a/test/cql-pytest/cassandra_tests/validation/operations/create_test.py b/test/cql-pytest/cassandra_tests/validation/operations/create_test.py index 43c1599999..4edf21cd04 100644 --- a/test/cql-pytest/cassandra_tests/validation/operations/create_test.py +++ b/test/cql-pytest/cassandra_tests/validation/operations/create_test.py @@ -540,7 +540,7 @@ def testDoubleWith(cql, test_keyspace): # "CREATE TABLE %s (a text, b int, c int, primary key (a, b))" # + " WITH memtable = 'test_missing_class';") # -# assertThrowsConfigurationException("Memtable class org.apache.cassandra.db.memtable.SkipListMemtable does not accept any futher parameters, but {invalid=throw} were given.", +# assertThrowsConfigurationException("Memtable class org.apache.cassandra.db.memtable.SkipListMemtable does not accept any further parameters, but {invalid=throw} were given.", # "CREATE TABLE %s (a text, b int, c int, primary key (a, b))" # + " WITH memtable = 'test_invalid_param';") # @@ -548,7 +548,7 @@ def testDoubleWith(cql, test_keyspace): # "CREATE TABLE %s (a text, b int, c int, primary key (a, b))" # + " WITH memtable = 'test_unknown_class';") # -# assertThrowsConfigurationException("Memtable class org.apache.cassandra.db.memtable.TestMemtable does not accept any futher parameters, but {invalid=throw} were given.", +# assertThrowsConfigurationException("Memtable class org.apache.cassandra.db.memtable.TestMemtable does not accept any further parameters, but {invalid=throw} were given.", # "CREATE TABLE %s (a text, b int, c int, primary key (a, b))" # + " WITH memtable = 'test_invalid_extra_param';") # diff --git a/test/cql-pytest/cassandra_tests/validation/operations/select_single_column_relation_test.py b/test/cql-pytest/cassandra_tests/validation/operations/select_single_column_relation_test.py index b049721f22..522e50693a 100644 --- a/test/cql-pytest/cassandra_tests/validation/operations/select_single_column_relation_test.py +++ b/test/cql-pytest/cassandra_tests/validation/operations/select_single_column_relation_test.py @@ -40,7 +40,7 @@ def testInvalidCollectionNonEQRelation(cql, test_keyspace): assert_invalid_message(cql, table, "Unsupported \"!=\" relation: b != 5", "SELECT * FROM %s WHERE c = 0 AND b != 5") # different error message in Scylla and Cassandra. Note that in the - # future, Scylla may want to support this restriction so the erorr + # future, Scylla may want to support this restriction so the error # message will change again. assert_invalid_message(cql, table, "IS NOT", "SELECT * FROM %s WHERE c = 0 AND b IS NOT NULL") @@ -344,7 +344,7 @@ def testCompositeIndexWithPrimaryKey(cql, test_keyspace): assert_empty(execute(cql, table, "SELECT content FROM %s WHERE time1 = 1 AND time2 = 1 AND author='foo' ALLOW FILTERING")) assert_empty(execute(cql, table, "SELECT content FROM %s WHERE time1 = 1 AND time2 > 0 AND author='foo' ALLOW FILTERING")) - # Scylla and Cassandra chose to print different erros in this case - + # Scylla and Cassandra chose to print different errors in this case - # Cassandra says that ALLOW FILTERING would have made this query # work, while Scylla says that time1 should have also been # restricted. @@ -565,7 +565,7 @@ def testInvalidColumnNames(cql, test_keyspace): assert_invalid_message(cql, table, "name d", "SELECT * FROM %s WHERE d CONTAINS 0") assert_invalid_message(cql, table, "name d", "SELECT * FROM %s WHERE d CONTAINS KEY 0") # Here, Cassandra says "Undefined column name d" but Scylla gives - # a clearer error message about the real cuase: "Aliases aren't + # a clearer error message about the real cause: "Aliases aren't # allowed in the where clause ('d = 0')". assert_invalid(cql, table, "SELECT a AS d FROM %s WHERE d = 0") assert_invalid(cql, table, "SELECT b AS d FROM %s WHERE d IN (0, 1)") diff --git a/test/cql-pytest/cassandra_tests/validation/operations/update_test.py b/test/cql-pytest/cassandra_tests/validation/operations/update_test.py index 32eb060047..3328b5adfd 100644 --- a/test/cql-pytest/cassandra_tests/validation/operations/update_test.py +++ b/test/cql-pytest/cassandra_tests/validation/operations/update_test.py @@ -10,14 +10,14 @@ import re def testTypeCasts(cql, test_keyspace): with create_table(cql, test_keyspace, "(k int PRIMARY KEY, t text, a ascii, d double, i int)") as table: - # The followings is fine + # The following is fine execute(cql, table, "UPDATE %s SET t = 'foo' WHERE k = ?", 0) execute(cql, table, "UPDATE %s SET t = (ascii)'foo' WHERE k = ?", 0) execute(cql, table, "UPDATE %s SET t = (text)(ascii)'foo' WHERE k = ?", 0) execute(cql, table, "UPDATE %s SET a = 'foo' WHERE k = ?", 0) execute(cql, table, "UPDATE %s SET a = (ascii)'foo' WHERE k = ?", 0) - # But trying to put some explicitely type-casted text into an ascii + # But trying to put some explicitly type-casted text into an ascii # column should be rejected (even though the text is actually ascci) assertInvalid(cql, table, "UPDATE %s SET a = (text)'foo' WHERE k = ?", 0) diff --git a/test/cql-pytest/conftest.py b/test/cql-pytest/conftest.py index 161ad75e66..3942a50d8f 100644 --- a/test/cql-pytest/conftest.py +++ b/test/cql-pytest/conftest.py @@ -4,7 +4,7 @@ # This file configures pytest for all tests in this directory, and also # defines common test fixtures for all of them to use. A "fixture" is some -# setup which an invididual test requires to run; The fixture has setup code +# setup which an individual test requires to run; The fixture has setup code # and teardown code, and if multiple tests require the same fixture, it can # be set up only once - while still allowing the user to run individual tests # and automatically setting up the fixtures they need. @@ -28,7 +28,7 @@ print(f"Driver name {DRIVER_NAME}, version {DRIVER_VERSION}") # By default, tests run against a CQL server (Scylla or Cassandra) listening -# on localhost:9042. Add the --host and --port options to allow overiding +# on localhost:9042. Add the --host and --port options to allow overriding # these defaults. def pytest_addoption(parser): parser.addoption('--host', action='store', default='localhost', diff --git a/test/cql-pytest/run-cassandra b/test/cql-pytest/run-cassandra index 9f6537a8fc..d29fa9304b 100755 --- a/test/cql-pytest/run-cassandra +++ b/test/cql-pytest/run-cassandra @@ -95,7 +95,7 @@ def run_cassandra_cmd(pid, dir): # Unfortunately, Cassandra's JMX cannot listen only on a specific # interface. To allow tests to use JMX (nodetool), we need to # have it listen on 0.0.0.0 :-( This is insecure, but arguably - # can be forgiven for test enviroments. The following JVM_OPTS + # can be forgiven for test environments. The following JVM_OPTS # configures that: 'JVM_OPTS': '-Dcassandra.jmx.remote.port=7199', } diff --git a/test/cql-pytest/test_allow_filtering.py b/test/cql-pytest/test_allow_filtering.py index 337b020b37..21195d11a4 100644 --- a/test/cql-pytest/test_allow_filtering.py +++ b/test/cql-pytest/test_allow_filtering.py @@ -446,7 +446,7 @@ def test_allow_filtering_multi_column_and_index(cql, test_keyspace): lambda r : r.r == 0 and (r.c1 < 2 or (r.c1 == 2 and r.c2 < 0))) # But if the base table's partition key is in the query, along with # the clustering key, then it's a full prefix of the index's - # clustering key - so filtering is not neeeded. PR #9122 fixed the + # clustering key - so filtering is not needed. PR #9122 fixed the # correctness of this query, but left ALLOW FILTERING mandatory so # the following test failed: check_af_optional(cql, (table, everything), diff --git a/test/cql-pytest/test_cast.py b/test/cql-pytest/test_cast.py index c0d7c2464e..91b268d7fb 100644 --- a/test/cql-pytest/test_cast.py +++ b/test/cql-pytest/test_cast.py @@ -161,7 +161,7 @@ def test_function_arg_type_hint(cql, table2): timestamp_value = 2*86400000 # 2 days after 1970-01-01 timeuuid_value = uuid.UUID('{53e99c40-b81b-11ed-be60-134dd121e491}') - # Explictly specifying the type using a type hint fixes the issue - the type for ? is now known. + # Explicitly specifying the type using a type hint fixes the issue - the type for ? is now known. prepared_timestamp = cql.prepare(f"INSERT INTO {table2} (pk, d) VALUES ({pk}, toDate((timestamp)?))") prepared_timeuuid = cql.prepare(f"INSERT INTO {table2} (pk, d) VALUES ({pk}, toDate((timeuuid)?))") diff --git a/test/cql-pytest/test_cast_data.py b/test/cql-pytest/test_cast_data.py index a6f54483a8..f59c2a9db6 100644 --- a/test/cql-pytest/test_cast_data.py +++ b/test/cql-pytest/test_cast_data.py @@ -82,7 +82,7 @@ def test_cast_from_large_varint(cql, table1): assert [(str(v),)] == list(cql.execute(f"SELECT CAST(cVarint AS ascii) FROM {table1} WHERE p={p}")) assert [(str(v),)] == list(cql.execute(f"SELECT CAST(cVarint AS text) FROM {table1} WHERE p={p}")) # "varchar" is supposed to be an alias to "text" and worked just as well, - # but suprisingly casting to varchar doesn't work on Cassandra, so let's + # but surprisingly casting to varchar doesn't work on Cassandra, so let's # test it in a separate test below, test_cast_from_large_varint_to_varchar # Casting a number to all other types is NOT allowed: for t in ['blob', 'boolean', 'counter', 'date', 'duration', 'inet', @@ -138,7 +138,7 @@ def test_cast_from_counter(cql, table2): assert [("1000",)] == list(cql.execute(f"SELECT CAST(c AS ascii) FROM {table2} WHERE p={p}")) assert [("1000",)] == list(cql.execute(f"SELECT CAST(c AS text) FROM {table2} WHERE p={p}")) # "varchar" is supposed to be an alias to "text" and should work, but - # suprisingly casting to varchar doesn't work on Cassandra, so we + # surprisingly casting to varchar doesn't work on Cassandra, so we # test it in a separate test below, test_cast_from_counter_to_varchar. # Casting a counter to all other types is NOT allowed: for t in ['blob', 'boolean', 'date', 'duration', 'inet', diff --git a/test/cql-pytest/test_describe.py b/test/cql-pytest/test_describe.py index e4fabacf1d..5488322122 100644 --- a/test/cql-pytest/test_describe.py +++ b/test/cql-pytest/test_describe.py @@ -324,7 +324,7 @@ def test_desc_aggregate(scylla_only, cql, test_keyspace, random_seed): finally: cql.execute(f"DROP AGGREGATE {test_keyspace}.{new_aggr}") -# Test that `DESC TABLE {tbl} WITH INTERNALS` contains additional informations for added/dropped columns +# Test that `DESC TABLE {tbl} WITH INTERNALS` contains additional information for added/dropped columns def test_desc_table_internals(cql, test_keyspace): with new_test_table(cql, test_keyspace, "a int primary key, b int, c int") as tbl: cql.execute(f"ALTER TABLE {tbl} DROP b") @@ -363,8 +363,8 @@ def test_desc_keyspace_elements(cql, random_seed): assert f"CREATE TYPE {udt}" not in ks_only_desc assert f"CREATE TABLE {tbl}" not in ks_only_desc -# Test that `DESC SCHEMA` contains all informations for user created keyspaces -# and `DESC FULL SCHEMA` contains also informations for system keyspaces +# Test that `DESC SCHEMA` contains all information for user created keyspaces +# and `DESC FULL SCHEMA` contains also information for system keyspaces def test_desc_schema(cql, test_keyspace, random_seed): with new_random_keyspace(cql) as ks: with new_random_table(cql, test_keyspace) as tbl1, new_random_table(cql, ks) as tbl2: @@ -426,7 +426,7 @@ def test_desc_index(cql, test_keyspace): ab_desc = cql.execute(f"DESC INDEX {test_keyspace}.{tbl_name}_b_idx_1").one().create_statement c_desc = cql.execute(f"DESC INDEX {test_keyspace}.named_index").one().create_statement - # Cassandra inserts a space between the table name and parantheses, + # Cassandra inserts a space between the table name and parentheses, # Scylla doesn't. This difference doesn't matter because both are # valid CQL commands if is_scylla(cql): @@ -468,7 +468,7 @@ def test_index_desc_in_table_desc(cql, test_keyspace): # ----------------------------------------------------------------------------- # "Generic describe" is a describe statement without specifying what kind of object # you want to describe, so it only requires keyspace name(optionally) and object name. -# Genric describe should be exactly the same as normal describe, so for instannce: +# Generic describe should be exactly the same as normal describe, so for instannce: # `DESC TABLE == DESC `. # # ScyllaDB looks for describing object in a following order: @@ -744,7 +744,7 @@ def maybe_quote(ident): num_quotes += (c == '"') if not need_quotes: - # TODO: Here is missing part from C++ implamentation (see cql3/cql3_type.cc:448) + # TODO: Here is missing part from C++ implementation (see cql3/cql3_type.cc:448) # Here function from Cql.g (cident) is used to ensure the ident doesn't need quoting. return ident diff --git a/test/cql-pytest/test_empty.py b/test/cql-pytest/test_empty.py index bce2d774f9..b2d6905f9a 100644 --- a/test/cql-pytest/test_empty.py +++ b/test/cql-pytest/test_empty.py @@ -147,7 +147,7 @@ def test_empty_int(cql, test_keyspace): # Above in test_empty_int() we noted a bizarre and archaic (not used by # modern CQL users) feature where any type can be set to "empty". # But the way to write this bizarre empty values in CQL was via an ugly -# blobAsInt(0x). It musn't be something as benign as trying to use an +# blobAsInt(0x). It mustn't be something as benign as trying to use an # empty string to set an integer. The following tests verify that trying # to use an empty string to set other types results in an error. Each type # will be a separate test, using one common test table. Each test will be diff --git a/test/cql-pytest/test_filtering.py b/test/cql-pytest/test_filtering.py index a0d385ee54..8e7293a713 100644 --- a/test/cql-pytest/test_filtering.py +++ b/test/cql-pytest/test_filtering.py @@ -204,7 +204,7 @@ def test_filtering_with_subscript(cql, test_keyspace, cassandra_bug): #with pytest.raises(InvalidRequest, match='Unsupported unset map key for column m1'): # cql.execute(stmt, [UNSET_VALUE]) - # Finally, check for sucessful filtering with subscripts. For that we + # Finally, check for successful filtering with subscripts. For that we # need to add some data: cql.execute("INSERT INTO "+table+" (p, m1, m2) VALUES (1, {1:2, 3:4}, {'dog':'cat', 'hi':'hello'})") cql.execute("INSERT INTO "+table+" (p, m1, m2) VALUES (2, {2:3, 4:5}, {'man':'woman', 'black':'white'})") @@ -394,8 +394,8 @@ def test_filter_and_fetch_size(cql, test_keyspace, use_index, driver_bug_1): results = cql.execute(s) assert len(results.current_rows) == 3 -# token() function should either take all parition key components or none of them, -# if the key(s) are specified, they should be listed in the paritition key order +# token() function should either take all partition key components or none of them, +# if the key(s) are specified, they should be listed in the partition key order # Reproduces #13468 def test_filter_token(cql, test_keyspace): with new_test_table(cql, test_keyspace, 'pk int, ck int, x int, PRIMARY KEY (pk, ck)') as table: diff --git a/test/cql-pytest/test_frozen_collection.py b/test/cql-pytest/test_frozen_collection.py index 819267aa28..6e9572fba5 100644 --- a/test/cql-pytest/test_frozen_collection.py +++ b/test/cql-pytest/test_frozen_collection.py @@ -88,7 +88,7 @@ def test_wrong_set_order_in_nested_2(cql, table1): assert isinstance(row.k, OrderedMapSerializedKey) # The Python driver implements k.items() inefficiently - it has # a list of keys as SortedSet objects, and converts them back to - # seralized strings to look them up in k._index. But this + # serialized strings to look them up in k._index. But this # conversion re-sorts the set and then it can't be found because # of issue #7856, so k.items() will throw KeyError when iterated. list(row.k.items()) diff --git a/test/cql-pytest/test_json.py b/test/cql-pytest/test_json.py index 62245f94a5..1793cb2b61 100644 --- a/test/cql-pytest/test_json.py +++ b/test/cql-pytest/test_json.py @@ -358,7 +358,7 @@ def test_tojson_decimal_high_mantissa(cql, table1): # This is a smaller version of test_tojson_decimal_high_mantissa, showing # that a much smaller exponent, 1e1000 works (this is not surprising) but -# results in 1000 digits of output. This hints that 1e1000000000 willl not +# results in 1000 digits of output. This hints that 1e1000000000 will not # work at all, without testing it directly as above. @pytest.mark.xfail(reason="issue #8002") def test_tojson_decimal_high_mantissa2(cql, table1): diff --git a/test/cql-pytest/test_keyspace.py b/test/cql-pytest/test_keyspace.py index cda3330ec6..f60d7f7d28 100644 --- a/test/cql-pytest/test_keyspace.py +++ b/test/cql-pytest/test_keyspace.py @@ -33,7 +33,7 @@ def test_create_keyspace_if_not_exists(cql, this_dc): cql.execute("CREATE KEYSPACE IF NOT EXISTS test_create_keyspace_if_not_exists WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '" + this_dc + "' : 2 }") cql.execute("DROP KEYSPACE test_create_keyspace_if_not_exists") -# The "WITH REPLICATION" part of CREATE KEYSPACE may not be ommitted - trying +# The "WITH REPLICATION" part of CREATE KEYSPACE may not be omitted - trying # to do so should result in a syntax error: def test_create_keyspace_missing_with(cql): with pytest.raises(SyntaxException): diff --git a/test/cql-pytest/test_lwt.py b/test/cql-pytest/test_lwt.py index cad3fe0314..dac55784e4 100644 --- a/test/cql-pytest/test_lwt.py +++ b/test/cql-pytest/test_lwt.py @@ -65,7 +65,7 @@ def test_lwt_static_condition(cql, table1): # Generate an LWT update where there is no value for the partition key, # as the WHERE restricts it using `p = {p} AND p = {p+1}`. -# Such quries are rejected. +# Such queries are rejected. def test_lwt_empty_partition_range(cql, table1): with pytest.raises(InvalidRequest): cql.execute(f"UPDATE {table1} SET r = 9000 WHERE p = 1 AND p = 1000 AND c = 2 IF r = 3") diff --git a/test/cql-pytest/test_materialized_view.py b/test/cql-pytest/test_materialized_view.py index ce7729deb1..2d30f38c93 100644 --- a/test/cql-pytest/test_materialized_view.py +++ b/test/cql-pytest/test_materialized_view.py @@ -594,8 +594,8 @@ def test_long_skipped_view_update_delete_with_timestamp2(cql, test_keyspace): cql.execute(f'DELETE FROM {table} USING TIMESTAMP {t} WHERE p=1') assert list(cql.execute(f"SELECT c FROM {table}")) == sorted(list(cql.execute(f"SELECT c FROM {mv}"))) -# Another, more fundemental, reproducer for issue #12297 where a certain -# modification to a base partition modifing more than 100 rows was not +# Another, more fundamental, reproducer for issue #12297 where a certain +# modification to a base partition modifying more than 100 rows was not # applied to the view beyond the 100th row. # The test above, test_long_skipped_view_update_delete_with_timestamp was one # such specific case, which involved a partition tombstone and a specific @@ -667,7 +667,7 @@ def test_mv_inherit_clustering_order(cql, test_keyspace): # When a materialized view specification declares the clustering keys of # they view, they default to the base table's clustering order (see test -# above), but the order can be overriden by an explicit "with clustering +# above), but the order can be overridden by an explicit "with clustering # order by" in the materialized view definition: def test_mv_override_clustering_order_1(cql, test_keyspace): with new_test_table(cql, test_keyspace, 'p int, c int, x int, y int, primary key (p,c)', 'with clustering order by (c DESC)') as table: diff --git a/test/cql-pytest/test_permissions.py b/test/cql-pytest/test_permissions.py index 18f68321dc..41e0832edb 100644 --- a/test/cql-pytest/test_permissions.py +++ b/test/cql-pytest/test_permissions.py @@ -333,7 +333,7 @@ def test_grant_perms_on_nonexistent_udf(cql, cassandra_bug): revoke(cql, 'EXECUTE', 'ALL FUNCTIONS', username) with pytest.raises(InvalidRequest): grant(cql, 'EXECUTE', f'ALL FUNCTIONS IN KEYSPACE {keyspace}', username) - # When the keyspace is non-existant, Scylla returns InvalidRequest + # When the keyspace is non-existent, Scylla returns InvalidRequest # and Cassandra returns ConfigurationException. Let's allow both. with pytest.raises((InvalidRequest, ConfigurationException)): grant(cql, 'EXECUTE', f'FUNCTION {keyspace}.{fun_name}(int)', username) diff --git a/test/cql-pytest/test_secondary_index.py b/test/cql-pytest/test_secondary_index.py index be1497031b..4bb62cc57d 100644 --- a/test/cql-pytest/test_secondary_index.py +++ b/test/cql-pytest/test_secondary_index.py @@ -525,7 +525,7 @@ def test_filter_and_limit(cql, test_keyspace, use_index, driver_bug_1): # The following test is similar to the previous one (test_filter_and_limit) # with one main difference: Whereas in the previous test the table's schema # had only a partition key, here we also add a clustering key. -# This variantion in the test is important because Scylla's index-using code +# This variation in the test is important because Scylla's index-using code # has a different code path for the case that the index lookup results in a # list of matching partitions (the previous test) and when it results in a # list of matching rows (this test). @@ -719,7 +719,7 @@ def test_index_set(cql, test_keyspace): assert [] == list(cql.execute(f'SELECT pk,ck FROM {table} WHERE s CONTAINS 7')) assert [] == list(cql.execute(f'SELECT pk,ck FROM {table} WHERE s CONTAINS 8')) # A set can only have the same value once. The set is now {2,5}, - # trying to add 2 again makes no diffence - and removing it just once + # trying to add 2 again makes no difference - and removing it just once # will remove this value: cql.execute(f'UPDATE {table} set s = s + {{2}} WHERE pk=1 AND ck=2') assert [(1,2)] == list(cql.execute(f'SELECT pk,ck FROM {table} WHERE s CONTAINS 2')) @@ -728,7 +728,7 @@ def test_index_set(cql, test_keyspace): # The set is now {5}. Replacing it with an empty set works as expected: cql.execute(f'UPDATE {table} SET s = {{}} WHERE pk=1 AND ck=2') assert [] == list(cql.execute(f'SELECT pk,ck FROM {table} WHERE s CONTAINS 5')) - # The DELETE operaiton does the same thing: + # The DELETE operation does the same thing: cql.execute(f'UPDATE {table} SET s = {{17,18}} WHERE pk=1 AND ck=2') assert [(1,2)] == list(cql.execute(f'SELECT pk,ck FROM {table} WHERE s CONTAINS 17')) assert [(1,2)] == list(cql.execute(f'SELECT pk,ck FROM {table} WHERE s CONTAINS 18')) @@ -829,7 +829,7 @@ def test_index_map_values_multiple_matching_rows(cql, test_keyspace, driver_bug_ cql.execute(f'CREATE INDEX ON {table}(m)') # Insert several rows with several different maps, some of them have # the value 3 in them somewhere, others don't. One of the maps has - # multiple occurances of the value 3, so we also reproduce here the + # multiple occurrences of the value 3, so we also reproduce here the # same bug that test_index_map_values_paging() reproduces. # Note: Scylla needs to skip a duplicate 3 value in (2,4) which # results in an empty page in the result set when page_size=1. We @@ -856,7 +856,7 @@ def test_index_map_values_partition_key_only(cql, test_keyspace, driver_bug_1): cql.execute(f'CREATE INDEX ON {table}(m)') # Insert several rows with several different maps, some of them have # the value 3 in them somewhere, others don't. One of the maps has - # multiple occurances of the value 3, so we also reproduce here the + # multiple occurrences of the value 3, so we also reproduce here the # same bug that test_index_map_values_paging() reproduces (and here # test its intersection with the case of no clustering key). cql.execute(f'INSERT INTO {table} (pk, m) VALUES (1, {{1:2, 3:4}})') @@ -924,7 +924,7 @@ def test_index_map_entries(cql, test_keyspace): schema = 'pk int, ck int, m map, PRIMARY KEY (pk, ck)' with new_test_table(cql, test_keyspace, schema) as table: cql.execute(f'CREATE INDEX ON {table}(entries(m))') - # indexing entires(m) will allow neither CONTAINS KEY nor CONTAINS + # indexing entries(m) will allow neither CONTAINS KEY nor CONTAINS with pytest.raises(InvalidRequest, match="ALLOW FILTERING"): cql.execute(f'SELECT pk,ck FROM {table} WHERE m CONTAINS 3') with pytest.raises(InvalidRequest, match="ALLOW FILTERING"): diff --git a/test/cql-pytest/test_tools.py b/test/cql-pytest/test_tools.py index 1b03a16f9d..84ce5fdd46 100644 --- a/test/cql-pytest/test_tools.py +++ b/test/cql-pytest/test_tools.py @@ -513,7 +513,7 @@ def system_scylla_local_sstable_prepared(cql, scylla_data_dir): * Locates an sstable belonging to system.scylla_local and returns it. """ with nodetool.no_autocompaction_context(cql, "system.scylla_local", "system_schema"): - # Need to flush system keyspaces whoose sstables we want to meddle + # Need to flush system keyspaces whose sstables we want to meddle # with, to make sure they are actually on disk. nodetool.flush_keyspace(cql, "system_schema") nodetool.flush_keyspace(cql, "system") diff --git a/test/cql-pytest/test_uda.py b/test/cql-pytest/test_uda.py index 3e44cdd506..0262f52a84 100644 --- a/test/cql-pytest/test_uda.py +++ b/test/cql-pytest/test_uda.py @@ -231,7 +231,7 @@ def test_drop_keyspace_with_uda(scylla_only, cql): with pytest.raises(ConfigurationException, match="Cannot drop non existing keyspace"): cql.execute(f"DROP KEYSPACE {ks}") -# Test that replacing the state function, reduce function or the final function succesfully changes the function used by the aggregate. +# Test that replacing the state function, reduce function or the final function successfully changes the function used by the aggregate. # When the state or final function is replaced, the new function should be used in following calls to the aggregate. Cassandra keeps using # the old function, which we consider a cassandra bug. def test_replace_sfunc_ffunc(cql, test_keyspace, cassandra_bug): diff --git a/test/cql-pytest/test_unset.py b/test/cql-pytest/test_unset.py index 4d81cabece..c7a1da570d 100644 --- a/test/cql-pytest/test_unset.py +++ b/test/cql-pytest/test_unset.py @@ -199,7 +199,7 @@ def test_unset_insert_where(cql, table2): cql.execute(stmt, [UNSET_VALUE]) # Similar to test_unset_insert_where() above, just use an LWT write ("IF -# NOT EXISTS"). Test that using an UNSET_VALUE in an LWT condtion causes +# NOT EXISTS"). Test that using an UNSET_VALUE in an LWT condition causes # a clear error, not silent skip and not a crash as in issue #13001. def test_unset_insert_where_lwt(cql, table2): p = unique_key_int() diff --git a/test/cql-pytest/test_use.py b/test/cql-pytest/test_use.py index 0c2b3c444f..a84c56b70d 100644 --- a/test/cql-pytest/test_use.py +++ b/test/cql-pytest/test_use.py @@ -17,7 +17,7 @@ import pytest from cassandra.protocol import InvalidRequest from util import unique_name, new_cql -# Check that CREATE TABLE and DROP TABLE work without an explict keyspace +# Check that CREATE TABLE and DROP TABLE work without an explicit keyspace # name if a default keyspace name is specified with "USE". def test_create_table_use_keyspace(cql, test_keyspace): with new_cql(cql) as ncql: diff --git a/test/cql/cdc_batch_delete_postimage_test.cql b/test/cql/cdc_batch_delete_postimage_test.cql index c30625e1ee..670c9fa0e0 100644 --- a/test/cql/cdc_batch_delete_postimage_test.cql +++ b/test/cql/cdc_batch_delete_postimage_test.cql @@ -14,7 +14,7 @@ begin batch insert into ks.t2 (pk, ck, v) values (1, 1, 100); delete from ks.t2 select "cdc$batch_seq_no", "cdc$operation", pk, ck, v from ks.t2_scylla_cdc_log; --- do range delete in batch, but not matcing ck +-- do range delete in batch, but not matching ck create table ks.t3 (pk int, ck int, v int, primary key(pk, ck)) with cdc = {'enabled': true, 'preimage': true, 'postimage': true}; -- do range delete in batch diff --git a/test/cql/cdc_batch_delete_postimage_test.result b/test/cql/cdc_batch_delete_postimage_test.result index dbd6afe784..f6fc9431f1 100644 --- a/test/cql/cdc_batch_delete_postimage_test.result +++ b/test/cql/cdc_batch_delete_postimage_test.result @@ -32,7 +32,7 @@ OK | 1 | 4 | 1 | null | null | +--------------------+-----------------+------+------+------+ > -> -- do range delete in batch, but not matcing ck +> -- do range delete in batch, but not matching ck > create table ks.t3 (pk int, ck int, v int, primary key(pk, ck)) with cdc = {'enabled': true, 'preimage': true, 'postimage': true}; OK > diff --git a/test/cql/lwt_batch_test.cql b/test/cql/lwt_batch_test.cql index f077513936..2ec092d1b3 100644 --- a/test/cql/lwt_batch_test.cql +++ b/test/cql/lwt_batch_test.cql @@ -189,8 +189,8 @@ select * from lwt; drop table lwt; -- -- --- condtitions on different list columns and different rows of the same --- partition, these columns are retreived fine and the appropriate row +-- conditions on different list columns and different rows of the same +-- partition, these columns are retrieved fine and the appropriate row -- is found when checking the conds -- -- correct read command: statement 1 condition is on column a and list update diff --git a/test/cql/lwt_batch_test.result b/test/cql/lwt_batch_test.result index 51fd0d3c7a..63827098ae 100644 --- a/test/cql/lwt_batch_test.result +++ b/test/cql/lwt_batch_test.result @@ -384,8 +384,8 @@ OK OK > -- > -- -> -- condtitions on different list columns and different rows of the same -> -- partition, these columns are retreived fine and the appropriate row +> -- conditions on different list columns and different rows of the same +> -- partition, these columns are retrieved fine and the appropriate row > -- is found when checking the conds > -- > -- correct read command: statement 1 condition is on column a and list update diff --git a/test/cql/lwt_test.cql b/test/cql/lwt_test.cql index 7cb3fbccaa..de7c06e552 100644 --- a/test/cql/lwt_test.cql +++ b/test/cql/lwt_test.cql @@ -433,7 +433,7 @@ update lwt set i = 3 where a = 1 if i < 1; update lwt set i = 4 where a = 1 if i > 1; update lwt set i = 5 where a = 1 if i >= 1; update lwt set i = 6 where a = 1 if i <= 1; --- Compare with another column: cassandra doesnt allow anyting but a +-- Compare with another column: cassandra doesnt allow anything but a -- constant on the right hand side :( update lwt set i = 7 where a = 1 if i = t; update lwt set i = 7 where a = 1 if i = d; diff --git a/test/cql/lwt_test.result b/test/cql/lwt_test.result index 69d0dcd801..3128b9eba5 100644 --- a/test/cql/lwt_test.result +++ b/test/cql/lwt_test.result @@ -1489,7 +1489,7 @@ OK |-------------+-----| | False | 5 | +-------------+-----+ -> -- Compare with another column: cassandra doesnt allow anyting but a +> -- Compare with another column: cassandra doesnt allow anything but a > -- constant on the right hand side :( > update lwt set i = 7 where a = 1 if i = t; diff --git a/test/lib/simple_schema.hh b/test/lib/simple_schema.hh index 841c57a305..8bc889ca85 100644 --- a/test/lib/simple_schema.hh +++ b/test/lib/simple_schema.hh @@ -31,7 +31,7 @@ // // CREATE TABLE ${ks}.${cf} (pk text, ck text, v text, s1 text static, PRIMARY KEY (pk, ck)); // -// where ks and cf are specified by the contructor. +// where ks and cf are specified by the constructor. class simple_schema { public: using with_static = bool_class; diff --git a/test/nodetool/README.md b/test/nodetool/README.md index 59d96db0a1..fdbbecc34f 100644 --- a/test/nodetool/README.md +++ b/test/nodetool/README.md @@ -1,6 +1,6 @@ # Front-end tests for nodetool -The tests in this directory excercise the nodetool client itself, mocking the API backend. +The tests in this directory exercise the nodetool client itself, mocking the API backend. This allows for testing all combinations of all supported options, and still keeping the tests quick. The tests can be run against both the scylla-native nodetool (default), or the inherited, C\*-based nodetool. diff --git a/test/object_store/test_basic.py b/test/object_store/test_basic.py index e09618bf40..5c8ff535f2 100644 --- a/test/object_store/test_basic.py +++ b/test/object_store/test_basic.py @@ -157,7 +157,7 @@ async def test_basic(test_tempdir, s3_server, ssl): desc = conn.execute(f"DESCRIBE KEYSPACE {ks}").one().create_statement # The storage_opts wraps options with '{ }' while the DESCRIBE - # does it like '{}' so strip the corner brances and spaces for check + # does it like '{}' so strip the corner branches and spaces for check assert f"{{'type': 'S3', 'bucket': '{s3_server.bucket_name}', 'endpoint': '{s3_server.address}'}}" in desc, "DESCRIBE generates unexpected storage options" res = conn.execute(f"SELECT * FROM {ks}.{cf};") diff --git a/test/perf/perf.hh b/test/perf/perf.hh index 1ff5c1f9e5..abda633e9f 100644 --- a/test/perf/perf.hh +++ b/test/perf/perf.hh @@ -178,7 +178,7 @@ std::ostream& operator<<(std::ostream& os, const perf_result_with_aio_writes& re * Measures throughput of an asynchronous action. Executes the action on all cores * in parallel, with given number of concurrent executions per core. * - * Runs many iterations. Prints partial total throughput after each iteraton. + * Runs many iterations. Prints partial total throughput after each iteration. * * Returns a vector of throughputs achieved in each iteration. */ diff --git a/test/pylib/artifact_registry.py b/test/pylib/artifact_registry.py index 00acff2692..ee1a02618b 100644 --- a/test/pylib/artifact_registry.py +++ b/test/pylib/artifact_registry.py @@ -23,7 +23,7 @@ class ArtifactRegistry: resources and artifacts, such as open ports, directories with temporary files or running auxiliary processes. Contains a map of all glboal resources, and as soon as the resource is taken by the test it is - reprsented in the artifact registry. """ + represented in the artifact registry. """ def __init__(self) -> None: self.suite_artifacts: Dict[Suite, List[Artifact]] = {} diff --git a/test/pylib/cql_repl/conftest.py b/test/pylib/cql_repl/conftest.py index b94fb73300..f2c4898e31 100644 --- a/test/pylib/cql_repl/conftest.py +++ b/test/pylib/cql_repl/conftest.py @@ -28,7 +28,7 @@ logger.warning("Driver version %s", DRIVER_VERSION) # By default, tests run against a CQL server (Scylla or Cassandra) listening -# on localhost:9042. Add the --host and --port options to allow overiding +# on localhost:9042. Add the --host and --port options to allow overriding # these defaults. def pytest_addoption(parser) -> None: """Set up command line parameters""" diff --git a/test/raft/fsm_test.cc b/test/raft/fsm_test.cc index cfb930d339..d80e6d1862 100644 --- a/test/raft/fsm_test.cc +++ b/test/raft/fsm_test.cc @@ -568,7 +568,7 @@ BOOST_AUTO_TEST_CASE(test_election_two_nodes_prevote) { auto msg = std::get(output.messages.back().second); BOOST_CHECK(msg.current_term == term_t{2} && !msg.vote_granted); - // Check that prevote with higer term get a reply with term in the future + // Check that prevote with higher term get a reply with term in the future // and does not change local term. // Move to follower again fsm.step(id2, raft::vote_reply{term_t{3}, false, true}); @@ -1069,7 +1069,7 @@ BOOST_AUTO_TEST_CASE(test_leader_stepdown) { fsm2.step(id2, raft::append_reply{fsm2.get_current_term(), idx, raft::append_reply::accepted{idx}}); // Accept new config entry on id3 fsm2.step(id3, raft::append_reply{fsm2.get_current_term(), idx, raft::append_reply::accepted{idx}}); - // C_new is now commited + // C_new is now committed output = fsm2.get_output(); // this sends out the entry submitted after C_new append = std::get(output.messages.back().second); idx = append.entries.back()->idx; @@ -1943,7 +1943,7 @@ BOOST_AUTO_TEST_CASE(test_leader_transfer_lost_timeout_now) { // ... and lose it. // By now, B and C should both remain in the follower state. - // Check that and attept to go forward with a normal election process to see + // Check that and attempt to go forward with a normal election process to see // that the cluster operates normally after `timeout_now` has been lost. BOOST_CHECK(B.is_follower()); BOOST_CHECK(C.is_follower()); diff --git a/test/raft/randomized_nemesis_test.cc b/test/raft/randomized_nemesis_test.cc index c20e0b1cb4..3741feec52 100644 --- a/test/raft/randomized_nemesis_test.cc +++ b/test/raft/randomized_nemesis_test.cc @@ -88,7 +88,7 @@ using snapshots_t = std::unordered_map; // as the ``boilerplate'' that allows the pure machine to be replicated // by Raft and communicate with the external world. // -// The interface also requires maintainance of snapshots. We use the +// The interface also requires maintenance of snapshots. We use the // `snapshots_t` introduced above; `impure_state_machine` keeps a reference to `snapshots_t` // because it will share it with an implementation of `raft::persistence`. template @@ -1164,7 +1164,7 @@ private: deliver_t _deliver; - // A min-heap of event occurences compared by their time points. + // A min-heap of event occurrences compared by their time points. std::vector _events; // Comparator for the `_events` min-heap. diff --git a/test/raft/replication.cc b/test/raft/replication.cc index 0808e0faf9..93a564ecb4 100644 --- a/test/raft/replication.cc +++ b/test/raft/replication.cc @@ -12,9 +12,9 @@ seastar::logger tlogger("test"); seastar::semaphore snapshot_sync(0); -// application of a snaphot with that id will be delayed until snapshot_sync is signaled +// application of a snapshot with that id will be delayed until snapshot_sync is signaled raft::snapshot_id delay_apply_snapshot{utils::UUID(0, 0xdeadbeaf)}; -// sending of a snaphot with that id will be delayed until snapshot_sync is signaled +// sending of a snapshot with that id will be delayed until snapshot_sync is signaled raft::snapshot_id delay_send_snapshot{utils::UUID(0xdeadbeaf, 0)}; std::vector to_raft_id_vec(std::vector nodes) noexcept { diff --git a/test/raft/replication.hh b/test/raft/replication.hh index f91204ffdd..4706909756 100644 --- a/test/raft/replication.hh +++ b/test/raft/replication.hh @@ -286,9 +286,9 @@ using snapshots = std::unordered_map>; extern seastar::semaphore snapshot_sync; -// application of a snaphot with that id will be delayed until snapshot_sync is signaled +// application of a snapshot with that id will be delayed until snapshot_sync is signaled extern raft::snapshot_id delay_apply_snapshot; -// sending of a snaphot with that id will be delayed until snapshot_sync is signaled +// sending of a snapshot with that id will be delayed until snapshot_sync is signaled extern raft::snapshot_id delay_send_snapshot; // Test connectivity configuration diff --git a/test/raft/replication_test.cc b/test/raft/replication_test.cc index ca79bf8659..d3f7958063 100644 --- a/test/raft/replication_test.cc +++ b/test/raft/replication_test.cc @@ -440,7 +440,7 @@ RAFT_TEST_CASE(rpc_configuration_truncate_restore_from_snp, (test_case{ // the crash + network partition and synchronization with B, since // the effective RPC cfg would be {A, B, C} both for // joint cfg = {.current = {A, B}, .previous = {A, B, C}} -// and the previously commited cfg = {A, B, C}. +// and the previously committed cfg = {A, B, C}. // // After that, test for the second case: switch leader back to A and // try to expand the cluster back to initial state (re-add diff --git a/test/redis/conftest.py b/test/redis/conftest.py index 8ad3be3fe5..de30a7c8d2 100644 --- a/test/redis/conftest.py +++ b/test/redis/conftest.py @@ -4,7 +4,7 @@ # This file contains "test fixtures", a pytest concept described in # https://docs.pytest.org/en/latest/fixture.html. -# A "fixture" is some sort of setup which an invididual test requires to run. +# A "fixture" is some sort of setup which an individual test requires to run. # The fixture has setup code and teardown code, and if multiple tests # require the same fixture, it can be set up only once - while still allowing # the user to run individual tests and automatically set up the fixtures they need. diff --git a/test/rest_api/conftest.py b/test/rest_api/conftest.py index 5506a64d23..f9af53f3a1 100644 --- a/test/rest_api/conftest.py +++ b/test/rest_api/conftest.py @@ -4,7 +4,7 @@ # This file configures pytest for all tests in this directory, and also # defines common test fixtures for all of them to use. A "fixture" is some -# setup which an invididual test requires to run; The fixture has setup code +# setup which an individual test requires to run; The fixture has setup code # and teardown code, and if multiple tests require the same fixture, it can # be set up only once - while still allowing the user to run individual tests # and automatically setting up the fixtures they need. @@ -24,7 +24,7 @@ from util import unique_name # By default, tests run against a Scylla server listening # on localhost:9042 for CQL and localhost:10000 for the REST API. -# Add the --host, --port, --ssl, or --api-port options to allow overiding these defaults. +# Add the --host, --port, --ssl, or --api-port options to allow overriding these defaults. def pytest_addoption(parser): parser.addoption('--host', action='store', default='localhost', help='Scylla server host to connect to') diff --git a/test/scylla-gdb/conftest.py b/test/scylla-gdb/conftest.py index f60d5ae52c..3eda3510b6 100644 --- a/test/scylla-gdb/conftest.py +++ b/test/scylla-gdb/conftest.py @@ -4,7 +4,7 @@ # This file configures pytest for all tests in this directory, and also # defines common test fixtures for all of them to use. A "fixture" is some -# setup which an invididual test requires to run; The fixture has setup code +# setup which an individual test requires to run; The fixture has setup code # and teardown code, and if multiple tests require the same fixture, it can # be set up only once - while still allowing the user to run individual tests # and automatically setting up the fixtures they need. diff --git a/test/topology/conftest.py b/test/topology/conftest.py index e6fc606e18..a4e9db13e3 100644 --- a/test/topology/conftest.py +++ b/test/topology/conftest.py @@ -58,7 +58,7 @@ FAILED_KEY = pytest.StashKey[bool]() @pytest.hookimpl(tryfirst=True, hookwrapper=True) def pytest_runtest_makereport(item, call): - """This is a post-test hook execucted by the pytest library. + """This is a post-test hook executed by the pytest library. Use it to access the test result and store a flag indicating failure so we can later retrieve it in our fixtures like `manager`. diff --git a/test/topology/test_change_ip.py b/test/topology/test_change_ip.py index 758666c67f..9898482bba 100644 --- a/test/topology/test_change_ip.py +++ b/test/topology/test_change_ip.py @@ -15,7 +15,7 @@ logger = logging.getLogger(__name__) @pytest.mark.asyncio async def test_change_two(manager, random_tables): """Stop two nodes, change their IPs and start, check the cluster is - funcitonal""" + functional""" servers = await manager.running_servers() table = await random_tables.add_table(ncolumns=5) s_1 = servers[1].server_id diff --git a/test/topology/test_concurrent_schema.py b/test/topology/test_concurrent_schema.py index a8fd920178..6d6cbb751d 100644 --- a/test/topology/test_concurrent_schema.py +++ b/test/topology/test_concurrent_schema.py @@ -61,6 +61,6 @@ async def test_cassandra_issue_10250(random_tables, fails_without_consistent_clu logger.debug("Done running concurrent schema changes") # Sleep to settle; original Cassandra issue repro sleeps 20 seconds await asyncio.sleep(1) - logger.debug("verifing schema status") + logger.debug("verifying schema status") # When bug happens, deleted columns are still there (often) and/or new columns are missing (rarely) await tables.verify_schema() diff --git a/test/topology_custom/test_different_group0_ids.py b/test/topology_custom/test_different_group0_ids.py index 5694974312..835e178cc2 100644 --- a/test/topology_custom/test_different_group0_ids.py +++ b/test/topology_custom/test_different_group0_ids.py @@ -68,7 +68,7 @@ async def test_different_group0_ids(manager: ManagerClient): # Check if decommissioning the second node fails. # Repair service throws a runtime exception "zero replica after the removal" # when it tries to remove the only one node from the cluster. - # If it is not thrown, it means that the second node succesfully send a gossip + # If it is not thrown, it means that the second node successfully send a gossip # to the first node and they merged their tokens metadata. with pytest.raises(Exception, match='zero replica after the removal'): await manager.decommission_node(scylla_b.server_id) diff --git a/test/topology_experimental_raft/test_raft_cluster_features.py b/test/topology_experimental_raft/test_raft_cluster_features.py index 4fe50d090c..1f844265d2 100644 --- a/test/topology_experimental_raft/test_raft_cluster_features.py +++ b/test/topology_experimental_raft/test_raft_cluster_features.py @@ -57,7 +57,7 @@ async def test_cannot_disable_cluster_feature_after_all_declare_support(manager: """Upgrade all nodes to support the test cluster feature, but suppress the topology coordinator and prevent it from enabling the feature. Try to downgrade one of the nodes - it should fail because of the - mising feature. Unblock the topology coordinator, restart the node + missing feature. Unblock the topology coordinator, restart the node and observe that the feature was enabled. """ servers = [await manager.server_add() for _ in range(3)] diff --git a/test/topology_experimental_raft/test_topology_ops.py b/test/topology_experimental_raft/test_topology_ops.py index 2f743ebc36..8d76e7963c 100644 --- a/test/topology_experimental_raft/test_topology_ops.py +++ b/test/topology_experimental_raft/test_topology_ops.py @@ -33,7 +33,7 @@ async def test_topology_ops(request, manager: ManagerClient): await wait_for_cql_and_get_hosts(manager.cql, await manager.running_servers(), time.time() + 60) cql = await reconnect_driver(manager) # FIXME: disabled as a workaround for #15935, #15924 - # We need to reenable once these issues are fixed. + # We need to re-enable once these issues are fixed. #finish_writes = await start_writes(cql) logger.info("Bootstrapping other nodes") diff --git a/test/unit/btree_validation.hh b/test/unit/btree_validation.hh index 1fcaffa5ad..7e259a9054 100644 --- a/test/unit/btree_validation.hh +++ b/test/unit/btree_validation.hh @@ -66,7 +66,7 @@ class validator { } else { if (n->is_leftmost()) { if (t._corners.left != n) { - fmt::print("leftmost tree {}, excpected {}\n", t._corners.left->id(), n->id()); + fmt::print("leftmost tree {}, expected {}\n", t._corners.left->id(), n->id()); return false; } if (!n->is_root() && n->_leaf_tree != &t) { @@ -76,7 +76,7 @@ class validator { } if (n->is_rightmost()) { if (t._corners.right != n) { - fmt::print("rightmost tree {}, excpected {}\n", t._corners.right->id(), n->id()); + fmt::print("rightmost tree {}, expected {}\n", t._corners.right->id(), n->id()); return false; } if (!n->is_root() && n->_leaf_tree != &t) { diff --git a/tracing/trace_state.hh b/tracing/trace_state.hh index 873068c46e..7576396b29 100644 --- a/tracing/trace_state.hh +++ b/tracing/trace_state.hh @@ -252,7 +252,7 @@ private: /** * Initiates a tracing session. * - * Starts the tracing session time measurments. + * Starts the tracing session time measurements. * This overload is meant for secondary sessions. */ void begin() { @@ -272,7 +272,7 @@ private: /** * Initiates a tracing session. * - * Starts the tracing session time measurments. + * Starts the tracing session time measurements. * This overload is meant for primary sessions. * * @param request description of a request being traces @@ -668,7 +668,7 @@ inline bool should_return_id_in_response(const trace_state_ptr& p) { /** * A helper for conditional invoking trace_state::begin() functions. * - * If trace state is initialized the operation takes place immediatelly, + * If trace state is initialized the operation takes place immediately, * otherwise nothing happens. * * @tparam A diff --git a/tracing/tracing.hh b/tracing/tracing.hh index a29518dba1..eb2dbfbb6a 100644 --- a/tracing/tracing.hh +++ b/tracing/tracing.hh @@ -529,7 +529,7 @@ public: * Checks if there is enough budget for the @param nr new records * @param nr number of new records * - * @return TRUE if there is enough budget, FLASE otherwise + * @return TRUE if there is enough budget, FALSE otherwise */ bool have_records_budget(uint64_t nr = 1) { // We don't want the total amount of pending, active and flushing records to diff --git a/utils/allocation_strategy.hh b/utils/allocation_strategy.hh index ccad0de11b..399be20572 100644 --- a/utils/allocation_strategy.hh +++ b/utils/allocation_strategy.hh @@ -281,7 +281,7 @@ using alloc_strategy_unique_ptr = std::unique_ptr>; // time. That seems to be the case in current uses, so a simplified scheme of // passing allocators will do. Allocation strategy is set in a thread-local // context, as shown below. From there, aware objects pick up the allocation -// strategy. The code controling the objects must ensure that object allocated +// strategy. The code controlling the objects must ensure that object allocated // in one regime is also freed in the same regime. // // with_allocator() provides a way to set the current allocation strategy used diff --git a/utils/array-search.hh b/utils/array-search.hh index 2835805d35..188e7fd2e9 100644 --- a/utils/array-search.hh +++ b/utils/array-search.hh @@ -21,7 +21,7 @@ static constexpr int64_t simple_key_unused_value = std::numeric_limits: * Returns the index of the first element in the array that's greater * than the given value. * - * To accomodate the single-instruction-multiple-data variant, observe + * To accommodate the single-instruction-multiple-data variant, observe * the following: * - capacity must be a multiple of 4 * - any items with indexes in [size, capacity) must be initialized diff --git a/utils/ascii.cc b/utils/ascii.cc index ce42df62be..83400ac511 100644 --- a/utils/ascii.cc +++ b/utils/ascii.cc @@ -1,5 +1,5 @@ /* - * Fast ASCII string validataion. + * Fast ASCII string validation. * * Copyright (c) 2018, Arm Limited. */ diff --git a/utils/bptree.hh b/utils/bptree.hh index 34a6f13d73..4f8187abda 100644 --- a/utils/bptree.hh +++ b/utils/bptree.hh @@ -676,7 +676,7 @@ public: /* * Special constructor for the case when there's the need for an - * iterator to the given value poiter. In this case we need to + * iterator to the given value pointer. In this case we need to * get three things: * - pointer on class data: we assume that the value pointer * is indeed embedded into the data and do the "container_of" @@ -1019,11 +1019,11 @@ class node final { /* * Leaf nodes are linked in a list, since leaf nodes do - * not use the _kids[0] pointer we re-use it. Respectively, + * not use the _kids[0] pointer we reuse it. Respectively, * non-leaf nodes don't use the __next one. * * Also, leftmost and rightmost respectively have prev and - * next pointing to the tree object itsef. This is done for + * next pointing to the tree object itself. This is done for * _left/_right update on node move. */ union { @@ -1257,7 +1257,7 @@ class node final { * killed. This merge is slightly different for leaves * and for non-leaves wrt the 0th element. * - * Non-leaves. For those we need the separation key, whic + * Non-leaves. For those we need the separation key, which * is passed to us. The caller "knows" that this and t are * two siblings and thus the separation key is the one from * the parent node. For this reason merging two non-leaf @@ -1414,7 +1414,7 @@ class node final { node* left = p._kids[i - 1].n; if (left->can_push_to()) { /* - * We've moved the 0th elemet from this, so the index + * We've moved the 0th element from this, so the index * for the new key shifts too */ idx--; @@ -1517,7 +1517,7 @@ class node final { /* * Split of nodes and the new key gets into either of the * halves. This is like leaves split, but we need to carefully - * handle the kids[0] for both. The correspoding key is not + * handle the kids[0] for both. The corresponding key is not * on the node and "has" an index of -1 and thus becomes the * separation one for the upper layer. * diff --git a/utils/compact-radix-tree.hh b/utils/compact-radix-tree.hh index 8567092883..beb27f668f 100644 --- a/utils/compact-radix-tree.hh +++ b/utils/compact-radix-tree.hh @@ -180,7 +180,7 @@ private: } /* - * Finds the number of leading elements that coinside for two + * Finds the number of leading elements that coincide for two * indices. Needed on insertion, when a short-cut node gets * expanded back. */ @@ -255,7 +255,7 @@ private: /* * Allocation returns a slot pointer and a boolean denoting * if the allocation really took place (false if the slot - * is aleady occupied) + * is already occupied) */ using allocate_res = std::pair; @@ -1155,7 +1155,7 @@ private: * The indirect layout is used to keep small number of sparse keys on * small node. To do that it keeps an array of indices and when is * asked to get an element searches in this array. This map additionally - * works as a presense bitmask from direct layout. + * works as a presence bitmask from direct layout. * * Since indirect layouts of different sizes have slots starting at * different addresses in memory, they cannot grow dynamically, but are @@ -1441,7 +1441,7 @@ private: /* * The plen is the level at which current node and desired - * index still coinside + * index still coincide */ unsigned plen = common_prefix_len(key, n_prefix); assert(plen >= depth); @@ -1547,7 +1547,7 @@ private: static void populate_slot(node_head_ptr& np, key_t key, unsigned depth) { /* - * Allocate leaf immediatelly with the prefix + * Allocate leaf immediately with the prefix * len big enough to cover all skipped node * up to the current depth */ diff --git a/utils/estimated_histogram.hh b/utils/estimated_histogram.hh index cb98e12e49..f685f432e2 100644 --- a/utils/estimated_histogram.hh +++ b/utils/estimated_histogram.hh @@ -185,7 +185,7 @@ public: /*! * \brief returns the smallest value that could have been added to this histogram * This method looks for the first non-empty bucket and returns its lower limit. - * Note that for non-empty histogram the lowest potentail value is Min. + * Note that for non-empty histogram the lowest potential value is Min. * * It will return 0 if the histogram is empty. */ diff --git a/utils/in.hh b/utils/in.hh index 1361318164..a2d6972c6b 100644 --- a/utils/in.hh +++ b/utils/in.hh @@ -77,7 +77,7 @@ public: typename std::aligned_storage::type data; }; - // conversion constuctor. See warning above. + // conversion constructor. See warning above. template::value && !is_in::type>::value,int>::type = 0> diff --git a/utils/intrusive_btree.hh b/utils/intrusive_btree.hh index e4c6c8cbcf..25c1b7ba5a 100644 --- a/utils/intrusive_btree.hh +++ b/utils/intrusive_btree.hh @@ -51,7 +51,7 @@ using key_index = size_t; using kid_index = size_t; /* - * The key's member_hook must point to something that's independet from + * The key's member_hook must point to something that's independent from * the tree's template parameters, so here's this base. It carries the * bare minimum of information needed for member_hook to operate (see * the iterator::erase()). @@ -803,7 +803,7 @@ public: /* * Special constructor for the case when there's the need for an - * iterator to the given value poiter. We can get all we need + * iterator to the given value pointer. We can get all we need * through the hook -> node_base -> node chain. */ iterator_base(pointer key) noexcept : iterator_base(&(key->*Hook), 0) { @@ -1651,7 +1651,7 @@ private: if (idx > 0) { left->grab_from_right(this, i - 1); /* - * We've moved the 0th elemet from this, so the index + * We've moved the 0th element from this, so the index * for the new key shifts too */ idx--; @@ -1857,7 +1857,7 @@ private: void grab_from_left(node* left, key_index idx) noexcept { /* - * Shif keys right -- left sibling's right key goes to parent, + * Shift keys right -- left sibling's right key goes to parent, * parent's goes to us. Like this * * left --> ABC D EF <-- this @@ -1881,7 +1881,7 @@ private: void grab_from_right(node* right, key_index idx) noexcept { /* - * Shif keys left -- rights sibling's zeroth key goes to parent, + * Shift keys left -- rights sibling's zeroth key goes to parent, * parent's goes to us. Like this * * this --> AB C DEF <-- right diff --git a/utils/lister.cc b/utils/lister.cc index ffcd176d98..e978c46e1d 100644 --- a/utils/lister.cc +++ b/utils/lister.cc @@ -44,7 +44,7 @@ future lister::guarantee_type(directory_entry de) { } else { auto f = file_type((_dir / de.name.c_str()).native(), follow_symlink::no); return f.then([dir = _dir, de = std::move(de)] (std::optional t) mutable { - // If some FS error occures - return an exceptional future + // If some FS error occurs - return an exceptional future if (!t) { return make_exception_future(std::runtime_error(format("Failed to get {} type.", (dir / de.name.c_str()).native()))); } diff --git a/utils/loading_cache.hh b/utils/loading_cache.hh index 02490c56b7..77720dd2d3 100644 --- a/utils/loading_cache.hh +++ b/utils/loading_cache.hh @@ -534,7 +534,7 @@ private: // The exceptions are related to the load operation itself. // We should ignore them for the background reads - if // they persist the value will age and will be reloaded in - // the forground. If the foreground READ fails the error + // the foreground. If the foreground READ fails the error // will be propagated up to the user and will fail the // corresponding query. try { diff --git a/utils/logalloc.cc b/utils/logalloc.cc index b4317a6ea0..19b207a97b 100644 --- a/utils/logalloc.cc +++ b/utils/logalloc.cc @@ -1450,7 +1450,7 @@ reclaim_timer::reclaim_timer(const char* name, is_preemptible preemptible, size_ // the hardware clock -- no effort is made to round the values to // resolution. Therefore, tick durations vary slightly in both // directions. We subtract something slightly bigger than these - // variations, to accomodate blocked-reactor-notify-ms values which + // variations, to accommodate blocked-reactor-notify-ms values which // are multiplies of resolution. // E.g. with kernel CONFIG_HZ=250, coarse clock resolution is 4ms. // If also we also have blocked-reactor-notify-ms=4, then we would diff --git a/utils/memory_limit_reached.hh b/utils/memory_limit_reached.hh index 4578ecc1d3..cc644f682c 100644 --- a/utils/memory_limit_reached.hh +++ b/utils/memory_limit_reached.hh @@ -13,7 +13,7 @@ namespace utils { // An exception thrown when a certain process or task is being terminated because -// it has reached the memory limit alloted for said task or task group. +// it has reached the memory limit allotted for said task or task group. // This is distinct from a regular bad-alloc in that possibly there is still // memory available but not for the task being terminated. // Allows code like LSA to tell real alloc failure from artificial one and act diff --git a/utils/rate_limiter.hh b/utils/rate_limiter.hh index b95de9c9d8..8a4ac2199a 100644 --- a/utils/rate_limiter.hh +++ b/utils/rate_limiter.hh @@ -18,7 +18,7 @@ namespace utils { /** * 100% naive rate limiter. Consider it a placeholder * Will let you process X "units" per second, then reset this every s. - * Obviously, accuracy is virtually non-existant and steady rate will fluctuate. + * Obviously, accuracy is virtually non-existent and steady rate will fluctuate. */ class rate_limiter { private: diff --git a/utils/reusable_buffer.hh b/utils/reusable_buffer.hh index 56fe41e030..4012e996b3 100644 --- a/utils/reusable_buffer.hh +++ b/utils/reusable_buffer.hh @@ -191,7 +191,7 @@ protected: * The returned views are always a prefix of the underlying capacity. * * Under a stable workload, the buffer's size will be stable. - * If a pathological request comes, the buffer will grow to accomodate it. + * If a pathological request comes, the buffer will grow to accommodate it. * 1-2 periods after the pathology ceases, the buffer will shrink back * to its steady-state size. * diff --git a/utils/s3/client.cc b/utils/s3/client.cc index 802f46d164..2ebf6a724a 100644 --- a/utils/s3/client.cc +++ b/utils/s3/client.cc @@ -617,7 +617,7 @@ future<> client::upload_sink_base::upload_part(memory_data_sink_buffers bufs) { if (ex) { co_await coroutine::return_exception_ptr(std::move(ex)); } - // note: At this point the buffers are sent, but the responce is not yet + // note: At this point the buffers are sent, but the response is not yet // received. However, claim is released and next part may start uploading }); diff --git a/utils/updateable_value.hh b/utils/updateable_value.hh index 417b8fdd2a..5b94613c87 100644 --- a/utils/updateable_value.hh +++ b/utils/updateable_value.hh @@ -213,7 +213,7 @@ updateable_value::observe(std::function callback) const { // Automatically updates a value from a utils::updateable_value // Where they can be of different types. -// An optional transfom function can provide an additional transformation +// An optional transform function can provide an additional transformation // when updating the value, like multiplying it by a factor for unit conversion, // for example. template diff --git a/utils/utf8.cc b/utils/utf8.cc index dc5c0b79c1..087ff33403 100644 --- a/utils/utf8.cc +++ b/utils/utf8.cc @@ -287,7 +287,7 @@ internal::validate_partial(const uint8_t *data, size_t len) { // range |= (tmp1, tmp2) << 3 bytes range = vorrq_u8(range, vextq_u8(tmp2, tmp1, 13)); - // Now we have below range indices caluclated + // Now we have below range indices calculated // Correct cases: // - 8 for C0~FF // - 3 for 1st byte after F0~FF @@ -470,7 +470,7 @@ internal::validate_partial(const uint8_t *data, size_t len) { // range |= (tmp1, tmp2) << 3 bytes range = _mm_or_si128(range, _mm_alignr_epi8(tmp1, tmp2, 13)); - // Now we have below range indices caluclated + // Now we have below range indices calculated // Correct cases: // - 8 for C0~FF // - 3 for 1st byte after F0~FF