From 436150eb524a36bd6408eab5e6207f12d2b4f919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Cybulski?= Date: Wed, 10 Sep 2025 18:47:38 +0200 Subject: [PATCH] treewide: fix spelling errors Fix spelling errors reported by copilot on github. Remove single use namespace alias. Closes scylladb/scylladb#25960 --- compaction/compaction_manager.cc | 4 ++-- db/view/view_building_coordinator.cc | 2 +- db/view/view_building_worker.cc | 2 +- docs/dev/tombstone.md | 4 ++-- docs/dev/view-building-coordinator.md | 4 ++-- ent/encryption/kms_host.cc | 4 +--- ent/encryption/symmetric_key.cc | 6 +++--- replica/database.cc | 2 +- service/topology_coordinator.cc | 2 +- sstables/trie/common.hh | 2 +- sstables/trie/node_reader.hh | 24 ++++++++++++------------ test/alternator/test_gsi.py | 2 +- test/cluster/dtest/commitlog_test.py | 2 +- utils/rest/client.hh | 2 +- 14 files changed, 30 insertions(+), 32 deletions(-) diff --git a/compaction/compaction_manager.cc b/compaction/compaction_manager.cc index 83706c37d0..9698864e94 100644 --- a/compaction/compaction_manager.cc +++ b/compaction/compaction_manager.cc @@ -1971,7 +1971,7 @@ future compaction_manager::perform_sst co_return compaction_stats_opt{}; } // All sstables must be included, even the ones being compacted, such that everything in table is validated. - // No need to split sstables as repaired or unrepaired. No need to take any compaction and repair locks, since this compation does not modify the sstable. + // No need to split sstables as repaired or unrepaired. No need to take any compaction and repair locks, since this compaction does not modify the sstable. auto all_sstables = co_await get_all_sstables(t); co_return co_await perform_compaction(throw_if_stopping::no, info, &t, info.id, std::move(all_sstables), quarantine_sstables); } @@ -2203,7 +2203,7 @@ future<> compaction_manager::try_perform_cleanup(owned_ranges_ptr sorted_owned_r update_sstable_cleanup_state(t, sst, *sorted_owned_ranges); }); }; - // No need to treat repaired and unrepaired sstables separtely here, + // No need to treat repaired and unrepaired sstables separately here, // since it only inserts or deletes sstables into or from // sstables_requiring_cleanup. co_await update_sstables_cleanup_state(co_await t.main_sstable_set()); diff --git a/db/view/view_building_coordinator.cc b/db/view/view_building_coordinator.cc index 9332f247c1..0d747fefa5 100644 --- a/db/view/view_building_coordinator.cc +++ b/db/view/view_building_coordinator.cc @@ -323,7 +323,7 @@ future view_building_coordinator::work_on_view_building(service::group0_gu // If there were no mutations for this replica, we can just remove the entry from `_remote_work` map // and start new work in the same iteration. - // Otherwise, the entry needs to be removed after the mutations are commited successfully. + // Otherwise, the entry needs to be removed after the mutations are committed successfully. if (skip_work_on_this_replica) { _remote_work_keys_to_erase.insert(replica); } else { diff --git a/db/view/view_building_worker.cc b/db/view/view_building_worker.cc index 9d4b1defdd..cd8dc47a7e 100644 --- a/db/view/view_building_worker.cc +++ b/db/view/view_building_worker.cc @@ -531,7 +531,7 @@ future<> view_building_worker::local_state::update(view_building_worker& vbw) { co_await clear_state(); if (vb_state.currently_processed_base_table) { - // When we start to process new base table, we need to flush its currrent data, so we can build the view. + // When we start to process new base table, we need to flush its current data, so we can build the view. co_await flush_table(vbw, *vb_state.currently_processed_base_table); } diff --git a/docs/dev/tombstone.md b/docs/dev/tombstone.md index 95aa4ad7f3..75bb52a0ff 100644 --- a/docs/dev/tombstone.md +++ b/docs/dev/tombstone.md @@ -616,8 +616,8 @@ See [Tombstones GC options](https://opensource.docs.scylladb.com/stable/cql/ddl. This is an optimization designed to allow the row cache to garbage collect some tombstones that overlap with live data in the memtable. Some workloads will result in the memtable receiving new writes with timestamps from the past. These past timestamp will overlap with the timestamps of tombstones in the row cache, preventing the cache from garbage collecting these tombstones. As a result, the row cache will accumulate tombstones, increasing the latencies of reads. -One such workload is Materialized Views, which will re-uses past timestamps to resurrect rows that were previously deleted with a [shadowable tombstone](./tombstone.md#shadowable-tombstone). A single such row, with an old timestamp, can prevent all tombstone garbage collection in the partition it lives in, as all later tombstones will overlap with it. +One such workload is Materialized Views, which reuses past timestamps to resurrect rows that were previously deleted with a [shadowable tombstone](./tombstone.md#shadowable-tombstone). A single such row, with an old timestamp, can prevent all tombstone garbage collection in the partition it lives in, as all later tombstones will overlap with it. Once [expired](./tombstone.md#expiry), a tombstone is known not cover any writes, new or old. If a write is known to originate from a time when a tombstone was already expired, it is safe to assume that the tombstone will not overlap with this write logically, even if the timestamps do overlap. Using this knowledge, ScyllaDB can elide the overlap check with a data source, if all writes contained therein are known to originate from a time when the tombstone was already expired. -To make use of this, memtables now store a logical *expiry treshold*, which is a snapshot of the tombstone expiry state at the time the memtable was created. +To make use of this, memtables now store a logical *expiry threshold*, which is a snapshot of the tombstone expiry state at the time the memtable was created. Using this, we can later check if a given tombstone was already expired at the time the memtable was created. If yes, the tombstone's garbage collection can elide the overlap check with this memtable. diff --git a/docs/dev/view-building-coordinator.md b/docs/dev/view-building-coordinator.md index ef10c46c72..2d50183873 100644 --- a/docs/dev/view-building-coordinator.md +++ b/docs/dev/view-building-coordinator.md @@ -13,7 +13,7 @@ Currently the coordinator processes at most only one base table at the time, bui ## View building task -Whole view building process is splitted into smaller view building tasks. +Whole view building process is split into smaller view building tasks. Each task is associated with particular tablet replica `(host_id, shard, tablet_id)` of a certain base table. There are 2 types of tasks: @@ -40,7 +40,7 @@ View building tasks are created when: A task might be aborted in two ways: by deleting it or by setting its state to `ABORTED`. If a view/keyspace is dropped, then its tasks are aborted by deleting them as they are no longer needed. -On the other hand, at the begining of a tablet operation (migration/resize/RF change), relevant view building tasks are aborted using `ABORTED` state. +On the other hand, at the beginning of a tablet operation (migration/resize/RF change), relevant view building tasks are aborted using `ABORTED` state. This intermediate state is needed to create new tasks at the end of the operation or in case of failure and rollback (aborted tasks are also deleted then). The view building coordinator starts a task only if its tablet is not in transition (`tablet_map.get_tablet_transition_info(tid) == nullptr`). diff --git a/ent/encryption/kms_host.cc b/ent/encryption/kms_host.cc index 8df4bc257d..e7d9f9d3ae 100644 --- a/ent/encryption/kms_host.cc +++ b/ent/encryption/kms_host.cc @@ -86,8 +86,6 @@ namespace kms_errors { [[maybe_unused]] static const char* AlreadyExistsException = "AlreadyExistsException"; } -namespace shttp = seastar::http; - static std::string to_lower(std::string_view s) { std::string tmp(s.size(), 0); std::transform(s.begin(), s.end(), tmp.begin(), ::tolower); @@ -566,7 +564,7 @@ future encryption::kms_host::impl::post(std::string_view target, s .service = "sts", .content_type = "application/x-www-form-urlencoded; charset=utf-8", .content = "Action=AssumeRole&Version=2011-06-15&RoleArn=" - + shttp::internal::url_encode(aws_assume_role_arn) + + seastar::http::internal::url_encode(aws_assume_role_arn) + "&RoleSessionName=" + role_session, .aws_access_key_id = aws_access_key_id, .aws_secret_access_key = aws_secret_access_key, diff --git a/ent/encryption/symmetric_key.cc b/ent/encryption/symmetric_key.cc index d080b86dea..1c722337a4 100644 --- a/ent/encryption/symmetric_key.cc +++ b/ent/encryption/symmetric_key.cc @@ -213,7 +213,7 @@ encryption::symmetric_key::symmetric_key(const key_info& info, const bytes& key) } std::string encryption::symmetric_key::validate_exact_info_result() const { - auto [types, modes, padds] = parse_key_spec(_info.alg); + auto [types, modes, paddings] = parse_key_spec(_info.alg); auto cipher = EVP_CIPHER_CTX_get0_cipher(*this); auto len = EVP_CIPHER_key_length(cipher); @@ -244,8 +244,8 @@ std::string encryption::symmetric_key::validate_exact_info_result() const { ss << _info << ": " << "Block mode " << i->second << " differers from requested " << modes << std::endl; } - if ((!padds.empty() && padds != "no") != _padding) { - ss << _info << ": " << "Padding (" << bool(_padding) << " differs from requested " << padds << std::endl; + if ((!paddings.empty() && paddings != "no") != _padding) { + ss << _info << ": " << "Padding (" << bool(_padding) << " differs from requested " << paddings << std::endl; } return ss.str(); diff --git a/replica/database.cc b/replica/database.cc index ff1a216e35..dd12649f21 100644 --- a/replica/database.cc +++ b/replica/database.cc @@ -2522,7 +2522,7 @@ future<> database::start(sharded& sl_controller, // We need the compaction manager ready early so we can reshard. if (!_compaction_manager.is_running()) { // It might be already enabled or even drained by the out of space controller. - // In this case, we do not want to enable it again or worse accidently overwrite + // In this case, we do not want to enable it again or worse accidentally overwrite // the drain call. _compaction_manager.enable(); } diff --git a/service/topology_coordinator.cc b/service/topology_coordinator.cc index 9126e027da..da73c806a6 100644 --- a/service/topology_coordinator.cc +++ b/service/topology_coordinator.cc @@ -1719,7 +1719,7 @@ class topology_coordinator : public endpoint_lifecycle_subscriber { case locator::tablet_transition_stage::end_repair: { if (do_barrier()) { if (action_failed(tablet_state.repair_update_compaction_ctrl)) { - rtlogger.warn("Failed to perfrom repair_update_compaction_ctrl for tablet repair tablet_id={}", gid); + rtlogger.warn("Failed to perform repair_update_compaction_ctrl for tablet repair tablet_id={}", gid); _tablets.erase(gid); updates.emplace_back(get_mutation_builder().del_transition(last_token).build()); break; diff --git a/sstables/trie/common.hh b/sstables/trie/common.hh index 045e8131c1..c3e1517663 100644 --- a/sstables/trie/common.hh +++ b/sstables/trie/common.hh @@ -45,7 +45,7 @@ inline void expensive_assert(bool expr, std::source_location srcloc = std::sourc } } -// We aleady have bytes_view, so perhaps it should be used here. +// We already have bytes_view, so perhaps it should be used here. // But std::span is, in some sense, the standard type for this purpose. // std::as_bytes() exists, after all. using const_bytes = std::span; diff --git a/sstables/trie/node_reader.hh b/sstables/trie/node_reader.hh index ce0732cdfb..a3cf812de2 100644 --- a/sstables/trie/node_reader.hh +++ b/sstables/trie/node_reader.hh @@ -21,25 +21,25 @@ using const_bytes = std::span; // Contains information about the result of the (partial) walk down. // -// For example, if the trie contains strings ("abc", "abd", "bc"), +// For example, if the trie contains strings ("123", "124", "23"), // then the trie looks like this (where * is the root node): // // * -// a-----b -// b c -// c-d +// 1-----2 +// 2 3 +// 3-4 // -// and if node "abd" is on a different page than node "ab", then -// `walk_down_along_key(pos_of_root, "abc")` might -// return node "ab" as the result, with +// and if node "124" is on a different page than node "12", then +// `walk_down_along_key(pos_of_root, "123")` might +// return node "12" as the result, with // // payload_bits = 0 // n_children = 2 -// found_idx = idx_of_child_d_in_node_ab -// found_byte = 'd' +// found_idx = idx_of_child_4_in_node_12 +// found_byte = '4' // traversed_key_bytes = 2 -// body_pos = pos_of_node_ab -// child_offset = pos_of_node_ab - pos_of_node_abc +// body_pos = pos_of_node_12 +// child_offset = pos_of_node_12 - pos_of_node_123 struct node_traverse_result { // Payload bits for this node. uint8_t payload_bits; @@ -117,7 +117,7 @@ concept node_reader = requires(T& o, int64_t pos, const_bytes key, int child_idx // Might walk over any number of *unimportant* nodes, // but does not walk past the first *important* node. // - // An *important* node is one which fullfills at least one of the following conditions: + // An *important* node is one which fulfills at least one of the following conditions: // 1. Has a payload. // 2. Has more than one child. // diff --git a/test/alternator/test_gsi.py b/test/alternator/test_gsi.py index d9906cac10..b50549830d 100644 --- a/test/alternator/test_gsi.py +++ b/test/alternator/test_gsi.py @@ -1152,7 +1152,7 @@ def test_gsi_5_describe_table_schema(test_table_gsi_5): # Similar DescribeTable schema test for test_table_gsi_2. The peculiarity # in that table is that the base table has only a hash key p, and index -# only hash hash key x; Now, while internally Scylla needs to add "p" as a +# only has hash key x; Now, while internally Scylla needs to add "p" as a # clustering key in the materialized view (in Scylla the view key always # contains the base key), when describing the table, "p" shouldn't be # returned as a range key, because the user didn't ask for it. diff --git a/test/cluster/dtest/commitlog_test.py b/test/cluster/dtest/commitlog_test.py index 4ed4dbaf27..882383fb41 100644 --- a/test/cluster/dtest/commitlog_test.py +++ b/test/cluster/dtest/commitlog_test.py @@ -678,7 +678,7 @@ class TestCommitLog(Tester): assert in_table == [self.values] # stop node - # because the mutation is large, it uses a code path that puts the commilog to disk before acknowledging the insert + # because the mutation is large, it uses a code path that puts the commitlog to disk before acknowledging the insert node1.stop(gently=False) # corrupt the commitlogs diff --git a/utils/rest/client.hh b/utils/rest/client.hh index 21ed1beba8..f4c390010b 100644 --- a/utils/rest/client.hh +++ b/utils/rest/client.hh @@ -21,7 +21,7 @@ namespace rest { /** * Wrapper for http::request, making setting headers, body, etc - * more convinient for our purposes. Separated from the below client + * more convenient for our purposes. Separated from the below client * so the logic can be shared with non-single usage, i.e. the free-form * simple_send method, possibly caching a http::client across calls. */