treewide: fix spelling errors

Fix spelling errors reported by copilot on github.
Remove single use namespace alias.

Closes scylladb/scylladb#25960
This commit is contained in:
Radosław Cybulski
2025-09-10 18:47:38 +02:00
committed by Avi Kivity
parent eae12c1717
commit 436150eb52
14 changed files with 30 additions and 32 deletions

View File

@@ -1971,7 +1971,7 @@ future<compaction_manager::compaction_stats_opt> 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<validate_sstables_compaction_task_executor>(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());

View File

@@ -323,7 +323,7 @@ future<bool> 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 {

View File

@@ -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);
}

View File

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

View File

@@ -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`).

View File

@@ -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<rjson::value> 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,

View File

@@ -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();

View File

@@ -2522,7 +2522,7 @@ future<> database::start(sharded<qos::service_level_controller>& 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();
}

View File

@@ -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;

View File

@@ -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<const std::byte> is, in some sense, the standard type for this purpose.
// std::as_bytes() exists, after all.
using const_bytes = std::span<const std::byte>;

View File

@@ -21,25 +21,25 @@ using const_bytes = std::span<const std::byte>;
// 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.
//

View File

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

View File

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

View File

@@ -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.
*/