Merge 'Typos: fix typos in code' from Yaniv Kaul
Fixes some more typos as found by codespell run on the code. In this commit, there are more user-visible errors. Refs: https://github.com/scylladb/scylladb/issues/16255 Closes scylladb/scylladb#16289 * github.com:scylladb/scylladb: Update unified/build_unified.sh Update main.cc Update dist/common/scripts/scylla-housekeeping Typos: fix typos in code
This commit is contained in:
@@ -77,7 +77,7 @@ static sstring_view table_status_to_sstring(table_status tbl_status) {
|
||||
case table_status::deleting:
|
||||
return "DELETING";
|
||||
}
|
||||
return "UKNOWN";
|
||||
return "UNKNOWN";
|
||||
}
|
||||
|
||||
static lw_shared_ptr<keyspace_metadata> create_keyspace_metadata(std::string_view keyspace_name, service::storage_proxy& sp, gms::gossiper& gossiper, api::timestamp_type);
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
"operations":[
|
||||
{
|
||||
"method":"POST",
|
||||
"summary":"Sets the minumum and maximum number of sstables in queue before compaction kicks off",
|
||||
"summary":"Sets the minimum and maximum number of sstables in queue before compaction kicks off",
|
||||
"type":"string",
|
||||
"nickname":"set_compaction_threshold",
|
||||
"produces":[
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"operations":[
|
||||
{
|
||||
"method":"GET",
|
||||
"summary":"Get the addreses of the down endpoints",
|
||||
"summary":"Get the addresses of the down endpoints",
|
||||
"type":"array",
|
||||
"items":{
|
||||
"type":"string"
|
||||
@@ -31,7 +31,7 @@
|
||||
"operations":[
|
||||
{
|
||||
"method":"GET",
|
||||
"summary":"Get the addreses of live endpoints",
|
||||
"summary":"Get the addresses of live endpoints",
|
||||
"type":"array",
|
||||
"items":{
|
||||
"type":"string"
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "The source labels, a match is based on concatination of the labels"
|
||||
"description": "The source labels, a match is based on concatenation of the labels"
|
||||
},
|
||||
"action": {
|
||||
"type": "string",
|
||||
"description": "The action to perfrom on match",
|
||||
"description": "The action to perform on match",
|
||||
"enum": ["skip_when_empty", "report_when_empty", "replace", "keep", "drop", "drop_label"]
|
||||
},
|
||||
"target_label": {
|
||||
@@ -28,7 +28,7 @@
|
||||
},
|
||||
"separator": {
|
||||
"type": "string",
|
||||
"description": "The separator string to use when concatinating the labels"
|
||||
"description": "The separator string to use when concatenating the labels"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1657,7 +1657,7 @@
|
||||
},
|
||||
{
|
||||
"method":"POST",
|
||||
"summary":"allows a user to reenable thrift",
|
||||
"summary":"allows a user to re-enable thrift",
|
||||
"type":"void",
|
||||
"nickname":"start_rpc_server",
|
||||
"produces":[
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
* of bytes is different than ordering of tokens (signed vs unsigned comparison).
|
||||
*
|
||||
* The type name stored for computations of this class is "token" - this was
|
||||
* the original implementation. (now depracated for new tables)
|
||||
* the original implementation. (now deprecated for new tables)
|
||||
*/
|
||||
class legacy_token_column_computation : public column_computation {
|
||||
public:
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
* Please use this class instead of legacy_token_column_computation.
|
||||
*
|
||||
* The type name stored for computations of this class is "token_v2".
|
||||
* (the name "token" refers to the depracated legacy_token_column_computation)
|
||||
* (the name "token" refers to the deprecated legacy_token_column_computation)
|
||||
*/
|
||||
class token_column_computation : public column_computation {
|
||||
public:
|
||||
|
||||
@@ -255,7 +255,7 @@ public:
|
||||
return type->compare(v1, v2);
|
||||
});
|
||||
}
|
||||
// Retruns true iff given prefix has no missing components
|
||||
// Returns true iff given prefix has no missing components
|
||||
bool is_full(managed_bytes_view v) const {
|
||||
assert(AllowPrefixes == allow_prefixes::yes);
|
||||
return std::distance(begin(v), end(v)) == (ssize_t)_types.size();
|
||||
|
||||
@@ -122,7 +122,7 @@ struct uninitialized {
|
||||
uninitialized& operator=(uninitialized&&) = default;
|
||||
operator T&&() && { return check(), std::move(*_val); }
|
||||
operator std::optional<T>&&() && { return check(), std::move(_val); }
|
||||
void check() const { if (!_val) { throw std::runtime_error("not intitialized"); } }
|
||||
void check() const { if (!_val) { throw std::runtime_error("not initialized"); } }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -332,7 +332,7 @@ std::pair<schema_builder, std::vector<view_ptr>> alter_table_statement::prepare_
|
||||
const auto& cdc_opts = dynamic_pointer_cast<cdc::cdc_extension>(it->second)->get_options();
|
||||
if (!cdc_opts.is_enabled_set()) {
|
||||
// "enabled" flag not specified
|
||||
throw exceptions::invalid_request_exception("Altering CDC options requires specyfing \"enabled\" flag");
|
||||
throw exceptions::invalid_request_exception("Altering CDC options requires specifying \"enabled\" flag");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -760,7 +760,7 @@ class db::commitlog::segment : public enable_shared_from_this<segment>, public c
|
||||
}
|
||||
|
||||
size_t buffer_position() const {
|
||||
// need some arithmetics to figure out what out actual position is, including
|
||||
// need some arithmetic to figure out what out actual position is, including
|
||||
// page checksums etc. The ostream does not include this, as it is subdivided and
|
||||
// skips sector_overhead parts of the memory buffer. So to get actual position
|
||||
// in the buffer, we need to add it back.
|
||||
|
||||
@@ -386,7 +386,7 @@ db::config::config(std::shared_ptr<db::extensions> exts)
|
||||
* @GroupDescription If you have changed any of the default directories during installation, make sure you have root access and set these properties.
|
||||
*/
|
||||
, work_directory(this, "workdir,W", value_status::Used, "/var/lib/scylla",
|
||||
"The directory in which Scylla will put all its subdirectories. The location of individual subdirs can be overriden by the respective *_directory options.")
|
||||
"The directory in which Scylla will put all its subdirectories. The location of individual subdirs can be overridden by the respective *_directory options.")
|
||||
, commitlog_directory(this, "commitlog_directory", value_status::Used, "",
|
||||
"The directory where the commit log is stored. For optimal write performance, it is recommended the commit log be on a separate disk partition (ideally, a separate physical device) from the data file directories.")
|
||||
, schema_commitlog_directory(this, "schema_commitlog_directory", value_status::Used, "",
|
||||
@@ -796,7 +796,7 @@ db::config::config(std::shared_ptr<db::extensions> exts)
|
||||
"\t Note: When selecting this option, you must change the default value (unlimited) of rpc_max_threads.\n"
|
||||
"\tYour own RPC server: You must provide a fully-qualified class name of an o.a.c.t.TServerFactory that can create a server instance.")
|
||||
, cache_hit_rate_read_balancing(this, "cache_hit_rate_read_balancing", value_status::Used, true,
|
||||
"This boolean controls whether the replicas for read query will be choosen based on cache hit ratio")
|
||||
"This boolean controls whether the replicas for read query will be chosen based on cache hit ratio")
|
||||
/**
|
||||
* @Group Advanced fault detection settings
|
||||
* @GroupDescription Settings to handle poorly performing or failing nodes.
|
||||
@@ -960,7 +960,7 @@ db::config::config(std::shared_ptr<db::extensions> exts)
|
||||
, prometheus_address(this, "prometheus_address", value_status::Used, {/* listen_address */}, "Prometheus listening address, defaulting to listen_address if not explicitly set")
|
||||
, prometheus_prefix(this, "prometheus_prefix", value_status::Used, "scylla", "Set the prefix of the exported Prometheus metrics. Changing this will break Scylla's dashboard compatibility, do not change unless you know what you are doing.")
|
||||
, abort_on_lsa_bad_alloc(this, "abort_on_lsa_bad_alloc", value_status::Used, false, "Abort when allocation in LSA region fails")
|
||||
, murmur3_partitioner_ignore_msb_bits(this, "murmur3_partitioner_ignore_msb_bits", value_status::Used, default_murmur3_partitioner_ignore_msb_bits, "Number of most siginificant token bits to ignore in murmur3 partitioner; increase for very large clusters")
|
||||
, murmur3_partitioner_ignore_msb_bits(this, "murmur3_partitioner_ignore_msb_bits", value_status::Used, default_murmur3_partitioner_ignore_msb_bits, "Number of most significant token bits to ignore in murmur3 partitioner; increase for very large clusters")
|
||||
, unspooled_dirty_soft_limit(this, "unspooled_dirty_soft_limit", value_status::Used, 0.6, "Soft limit of unspooled dirty memory expressed as a portion of the hard limit")
|
||||
, sstable_summary_ratio(this, "sstable_summary_ratio", value_status::Used, 0.0005, "Enforces that 1 byte of summary is written for every N (2000 by default) "
|
||||
"bytes written to data file. Value must be between 0 and 1.")
|
||||
@@ -1423,7 +1423,7 @@ static future<std::vector<seastar::metrics::relabel_config>> get_relable_from_fi
|
||||
} else if (key == "regex") {
|
||||
relabels[i].expr = e_it->second.as<std::string>();
|
||||
} else {
|
||||
throw std::runtime_error("unkown entry '" + key + "' in file " + name);
|
||||
throw std::runtime_error("unknown entry '" + key + "' in file " + name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
std::vector<db::commitlog_file_extension*> commitlog_file_extensions() const;
|
||||
|
||||
/**
|
||||
* Registered extensions keywords, i.e. custom properties/propery sets
|
||||
* Registered extensions keywords, i.e. custom properties/property sets
|
||||
* for schema extensions
|
||||
*/
|
||||
std::set<sstring> schema_extension_keywords() const;
|
||||
|
||||
@@ -328,7 +328,7 @@ future<> hint_sender::send_one_hint(lw_shared_ptr<send_one_file_ctx> ctx_ptr, fr
|
||||
f.ignore_ready_future();
|
||||
});
|
||||
}).handle_exception([ctx_ptr, rp] (auto eptr) {
|
||||
manager_logger.trace("send_one_file(): Hmmm. Something bad had happend: {}", eptr);
|
||||
manager_logger.trace("send_one_file(): Hmmm. Something bad had happened: {}", eptr);
|
||||
ctx_ptr->on_hint_send_failure(rp);
|
||||
});
|
||||
}
|
||||
@@ -387,7 +387,7 @@ future<> hint_sender::wait_until_hints_are_replayed_up_to(abort_source& as, db::
|
||||
// therefore we cannot capture `this`
|
||||
auto ep = end_point_key();
|
||||
return (**ptr).get_future().finally([sub = std::move(sub), ep] {
|
||||
manager_logger.debug("[{}] wait_until_hints_are_replayed_up_to(): returning afther the future was satisfied", ep);
|
||||
manager_logger.debug("[{}] wait_until_hints_are_replayed_up_to(): returning after the future was satisfied", ep);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
2
dist/common/scripts/node_health_check
vendored
2
dist/common/scripts/node_health_check
vendored
@@ -287,7 +287,7 @@ echo "=======" >> $REPORT
|
||||
echo "This document first serves as a system review and health check report." >> $REPORT
|
||||
echo "It is based on the configuration data (hardware, OS, Scylla SW, etc.) collected from the node." >> $REPORT
|
||||
echo "Based on the review and analysis of the collected data, ScyllaDB can recommend on possible" >> $REPORT
|
||||
echo "ways to better utilize the cluster, based on both experiance and best practices." >> $REPORT
|
||||
echo "ways to better utilize the cluster, based on both experience and best practices." >> $REPORT
|
||||
echo "" >> $REPORT
|
||||
echo "" >> $REPORT
|
||||
|
||||
|
||||
2
dist/common/scripts/scylla-housekeeping
vendored
2
dist/common/scripts/scylla-housekeeping
vendored
@@ -51,7 +51,7 @@ def get_url(path):
|
||||
# If server returns any error, like 403, or 500 urllib.request throws exception, which is not serializable.
|
||||
# When multiprocessing routines fail to serialize it, it throws ambiguous serialization exception
|
||||
# from get_json_from_url.
|
||||
# In order to see legit error we catch it from the inside of process, covert to string and
|
||||
# In order to see legit error we catch it from the inside of process, convert to string and
|
||||
# pass it as part of return value
|
||||
try:
|
||||
return 0, urllib.request.urlopen(path).read().decode('utf-8')
|
||||
|
||||
2
dist/common/scripts/scylla_setup
vendored
2
dist/common/scripts/scylla_setup
vendored
@@ -415,7 +415,7 @@ if __name__ == '__main__':
|
||||
|
||||
res = interactive_ask_service('Do you want to setup RAID and XFS?', 'It is recommended to use RAID and XFS for Scylla data. If you select yes, you will be prompted to choose the unmounted disks to use for Scylla data. Selected disks are formatted as part of the process.\nYes - choose a disk/disks to format and setup for RAID and XFS. No - skip this step.', raid_setup)
|
||||
if res:
|
||||
raid_setup = interactive_ask_service('Are you sure you want to setup RAID and XFS?', 'If you choose Yes, the selected drive will be reformated, erasing all existing data in the process.', raid_setup)
|
||||
raid_setup = interactive_ask_service('Are you sure you want to setup RAID and XFS?', 'If you choose Yes, the selected drive will be reformatted, erasing all existing data in the process.', raid_setup)
|
||||
else:
|
||||
raid_setup = False
|
||||
if res and raid_setup:
|
||||
|
||||
2
dist/common/scripts/scylla_sysconfig_setup
vendored
2
dist/common/scripts/scylla_sysconfig_setup
vendored
@@ -74,7 +74,7 @@ if __name__ == '__main__':
|
||||
warning = match.group(1)
|
||||
rps_cpus = match.group(2)
|
||||
except:
|
||||
raise Exception(f'Failed to retrive CPU mask: {res}')
|
||||
raise Exception(f'Failed to retrieve CPU mask: {res}')
|
||||
# print warning message if available
|
||||
if warning:
|
||||
print(warning.strip())
|
||||
|
||||
2
dist/debuginfo/install.sh
vendored
2
dist/debuginfo/install.sh
vendored
@@ -21,7 +21,7 @@ Usage: install.sh [options]
|
||||
Options:
|
||||
--root /path/to/root alternative install root (default /)
|
||||
--prefix /prefix directory prefix (default /usr)
|
||||
--nonroot install Scylla without required root priviledge
|
||||
--nonroot install Scylla without required root privilege
|
||||
--help this helpful message
|
||||
EOF
|
||||
exit 1
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
|
||||
virtual ~duration_unit() = default;
|
||||
|
||||
// Units with larger indicies are greater. For example, "months" have a greater index than "days".
|
||||
// Units with larger indices are greater. For example, "months" have a greater index than "days".
|
||||
virtual index_type index() const noexcept = 0;
|
||||
|
||||
virtual const char* short_name() const noexcept = 0;
|
||||
|
||||
@@ -39,7 +39,7 @@ const std::unordered_map<exception_code, sstring>& exception_map() {
|
||||
{exception_code::WRITE_FAILURE, "write_failure"},
|
||||
{exception_code::CDC_WRITE_FAILURE, "cdc_write_failure"},
|
||||
{exception_code::SYNTAX_ERROR, "syntax_error"},
|
||||
{exception_code::UNAUTHORIZED, "unathorized"},
|
||||
{exception_code::UNAUTHORIZED, "unauthorized"},
|
||||
{exception_code::INVALID, "invalid"},
|
||||
{exception_code::CONFIG_ERROR, "config_error"},
|
||||
{exception_code::ALREADY_EXISTS, "already_exists"},
|
||||
|
||||
@@ -2511,7 +2511,7 @@ bool gossiper::is_safe_for_restart(inet_address endpoint, locator::host_id host_
|
||||
break;
|
||||
}
|
||||
} catch (...) {
|
||||
logger.info("is_safe_for_restart: node={} doest not have status or host_id yet in gossip", node);
|
||||
logger.info("is_safe_for_restart: node={} doesn't not have status or host_id yet in gossip", node);
|
||||
}
|
||||
}
|
||||
return allowed;
|
||||
|
||||
2
init.hh
2
init.hh
@@ -80,7 +80,7 @@ public:
|
||||
virtual void append_options(db::config&, boost::program_options::options_description_easy_init&)
|
||||
{};
|
||||
// Called after command line is parsed and db/config populated.
|
||||
// Hooked config can for example take this oppurtunity to load any file(s).
|
||||
// Hooked config can for example take this opportunity to load any file(s).
|
||||
virtual future<> initialize(const boost::program_options::variables_map&) {
|
||||
return make_ready_future();
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ static void* lua_alloc(void* ud, void* ptr, size_t osize, size_t nsize) {
|
||||
}
|
||||
|
||||
if (next > s->max) {
|
||||
lua_logger.info("allocation failed. alread allocated = {}, next total = {}, max = {}", s->allocated, next, s->max);
|
||||
lua_logger.info("allocation failed. already allocated = {}, next total = {}, max = {}", s->allocated, next, s->max);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ private:
|
||||
future<bool> property_file_was_modified();
|
||||
|
||||
/**
|
||||
* Read the propery file if it has changed since the last time we read it.
|
||||
* Read the property file if it has changed since the last time we read it.
|
||||
*/
|
||||
future<> read_property_file();
|
||||
|
||||
|
||||
8
main.cc
8
main.cc
@@ -1280,7 +1280,7 @@ To start the scylla server proper, simply invoke as: scylla server (or just scyl
|
||||
});
|
||||
|
||||
// #14299 - do early init of messaging_service (or rather its TLS structures)
|
||||
// since other things (failure_detector) might try to send messages vie it
|
||||
// since other things (failure_detector) might try to send messages via it
|
||||
// before start_listen is called.
|
||||
messaging.invoke_on_all(&netw::messaging_service::start).get();
|
||||
|
||||
@@ -1649,7 +1649,7 @@ To start the scylla server proper, simply invoke as: scylla server (or just scyl
|
||||
});
|
||||
|
||||
// Register storage_service to migration_notifier so we can update
|
||||
// pending ranges when keyspace is chagned
|
||||
// pending ranges when keyspace is changed
|
||||
mm_notifier.local().register_listener(&ss.local());
|
||||
auto stop_mm_listener = defer_verbose_shutdown("storage service notifications", [&mm_notifier, &ss] {
|
||||
mm_notifier.local().unregister_listener(&ss.local()).get();
|
||||
@@ -1680,7 +1680,7 @@ To start the scylla server proper, simply invoke as: scylla server (or just scyl
|
||||
});
|
||||
|
||||
// Setup group0 early in case the node is bootstrapped already and the group exists.
|
||||
// Need to do it before allowing incomming messaging service connections since
|
||||
// Need to do it before allowing incoming messaging service connections since
|
||||
// storage proxy's and migration manager's verbs may access group0.
|
||||
// This will also disable migration manager schema pulls if needed.
|
||||
group0_service.setup_group0_if_exist(sys_ks.local(), ss.local(), qp.local(), mm.local(), raft_topology_change_enabled).get();
|
||||
@@ -2001,7 +2001,7 @@ int main(int ac, char** av) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Even on the environment which causes error during initalize Scylla,
|
||||
// Even on the environment which causes errors during Scylla initialization,
|
||||
// "scylla --version" should be able to run without error.
|
||||
// To do so, we need to parse and execute these options before
|
||||
// initializing Scylla/Seastar classes.
|
||||
|
||||
@@ -81,7 +81,7 @@ void mutation::set_cell(const clustering_key_prefix& prefix, const column_defini
|
||||
} else if (def.is_regular()) {
|
||||
set_clustered_cell(prefix, def, std::move(value));
|
||||
} else {
|
||||
throw std::runtime_error("attemting to store into a key cell");
|
||||
throw std::runtime_error("attempting to store into a key cell");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ std::optional<timestamp_based_splitting_mutation_writer::bucket_id> timestamp_ba
|
||||
}
|
||||
return bucket;
|
||||
}
|
||||
throw std::runtime_error(fmt::format("Cannot classify timestamp of cell (column {} of uknown type {})", cdef.name_as_text(), cdef.type->name()));
|
||||
throw std::runtime_error(fmt::format("Cannot classify timestamp of cell (column {} of unknown type {})", cdef.name_as_text(), cdef.type->name()));
|
||||
}
|
||||
|
||||
std::optional<timestamp_based_splitting_mutation_writer::bucket_id> timestamp_based_splitting_mutation_writer::examine_row(const row& r,
|
||||
|
||||
@@ -58,7 +58,7 @@ static bool ring_position_matches(const schema& s, const dht::partition_range& r
|
||||
// If there are no clustering columns or the select is distinct we don't
|
||||
// have clustering rows at all. In this case we can be sure we won't have
|
||||
// anything more in the last page's partition and thus the start bound is
|
||||
// exclusive. Otherwise there migh be clustering rows still and it is
|
||||
// exclusive. Otherwise there might be clustering rows still and it is
|
||||
// inclusive.
|
||||
const auto expected_inclusiveness = s.clustering_key_size() > 0 &&
|
||||
!slice.options.contains<query::partition_slice::option::distinct>() &&
|
||||
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
/// * It accepts a factory function which is used to create a new querier if
|
||||
/// the lookup fails (see below). This allows for simple call sites.
|
||||
/// * It does range matching. A query sometimes will result in multiple querier
|
||||
/// objects executing on the same node and shard paralelly. To identify the
|
||||
/// objects executing on the same node and shard parallelly. To identify the
|
||||
/// appropriate querier lookup() will consider - in addition to the lookup
|
||||
/// key - the read range.
|
||||
/// * It does schema version and position checking. In some case a subsequent
|
||||
|
||||
@@ -273,7 +273,7 @@ partition_slice native_reverse_slice_to_legacy_reverse_slice(const schema& schem
|
||||
// Fully reverse slice (forward to native reverse or native reverse to forward).
|
||||
// Also toggles the reversed bit in `partition_slice::options`.
|
||||
partition_slice reverse_slice(const schema& schema, partition_slice slice);
|
||||
// Half reverse slice (forwad to legacy reverse or legacy reverse to forward).
|
||||
// Half reverse slice (forward to legacy reverse or legacy reverse to forward).
|
||||
// Also toggles the reversed bit in `partition_slice::options`.
|
||||
partition_slice half_reverse_slice(const schema&, partition_slice);
|
||||
|
||||
|
||||
@@ -345,7 +345,7 @@ future<> server_impl::start() {
|
||||
index_t stable_idx = log.stable_idx();
|
||||
logger.trace("[{}] start raft instance: snapshot id={} commit index={} last stable index={}", id(), snapshot.id, commit_idx, stable_idx);
|
||||
if (commit_idx > stable_idx) {
|
||||
on_internal_error(logger, "Raft init failed: commited index cannot be larger then persisted one");
|
||||
on_internal_error(logger, "Raft init failed: committed index cannot be larger then persisted one");
|
||||
}
|
||||
_fsm = std::make_unique<fsm>(_id, term, vote, std::move(log), commit_idx, *_failure_detector,
|
||||
fsm_config {
|
||||
|
||||
@@ -232,7 +232,7 @@ private:
|
||||
// After memory consumption goes above the above limit, only one reader
|
||||
// (permit) is allowed to make progress, this method will block for all other
|
||||
// one, until:
|
||||
// * The blessed read finishes and a new blessed permit is choosen.
|
||||
// * The blessed read finishes and a new blessed permit is chosen.
|
||||
// * Memory consumption falls below the limit.
|
||||
future<> request_memory(reader_permit::impl& permit, size_t memory);
|
||||
|
||||
|
||||
@@ -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.
|
||||
// Although we consistently refer to this as buffer size throught the code
|
||||
// Although we consistently refer to this as buffer size throughout 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 {
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
/// The read starts with a concurrency of one, that is the reader reads from a
|
||||
/// single shard at a time. The concurrency is exponentially increased (to a
|
||||
/// maximum of the number of shards) when a reader's buffer is empty after
|
||||
/// moving the next shard. This condition is important as we only wan't to
|
||||
/// moving the next shard. This condition is important as we only want to
|
||||
/// increase concurrency for sparse tables that have little data and the reader
|
||||
/// has to move between shards often. When concurrency is > 1, the reader
|
||||
/// issues background read-aheads to the next shards so that by the time it
|
||||
|
||||
@@ -183,4 +183,4 @@ future<bytes> lolwut5(const int cols, const int squares_per_row, const int squar
|
||||
return make_ready_future<bytes>(rendered);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1813,7 +1813,7 @@ future<> repair_service::do_decommission_removenode_with_repair(locator::token_m
|
||||
neighbors_set = get_neighbors_set(boost::copy_range<std::vector<inet_address>>(new_eps));
|
||||
}
|
||||
} else {
|
||||
throw std::runtime_error(format("{}: keyspace={}, range={}, current_replica_endpoints={}, new_replica_endpoints={}, wrong nubmer of new owner node={}",
|
||||
throw std::runtime_error(format("{}: keyspace={}, range={}, current_replica_endpoints={}, new_replica_endpoints={}, wrong number of new owner node={}",
|
||||
op, keyspace_name, r, current_eps, new_eps, new_owner));
|
||||
}
|
||||
neighbors_set.erase(myip);
|
||||
|
||||
@@ -1844,7 +1844,7 @@ private:
|
||||
if (status == repair_stream_cmd::put_rows_done) {
|
||||
return make_ready_future<stop_iteration>(stop_iteration::yes);
|
||||
} else if (status == repair_stream_cmd::error) {
|
||||
throw std::runtime_error(format("put_row_diff: Repair follower={} failed in put_row_diff hanlder, status={}", remote_node, int(status)));
|
||||
throw std::runtime_error(format("put_row_diff: Repair follower={} failed in put_row_diff handler, status={}", remote_node, int(status)));
|
||||
} else {
|
||||
throw std::runtime_error("put_row_diff: Got unexpected repair_stream_cmd");
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@ database::setup_metrics() {
|
||||
|
||||
sm::make_counter("querier_cache_resource_based_evictions", _querier_cache.get_stats().resource_based_evictions,
|
||||
sm::description("Counts querier cache entries that were evicted to free up resources "
|
||||
"(limited by reader concurency limits) necessary to create new readers.")),
|
||||
"(limited by reader concurrency limits) necessary to create new readers.")),
|
||||
|
||||
sm::make_gauge("querier_cache_population", _querier_cache.get_stats().population,
|
||||
sm::description("The number of entries currently in the querier cache.")),
|
||||
|
||||
@@ -954,7 +954,7 @@ public:
|
||||
*
|
||||
* When `with_internals` is true, the description is extended with table's id and dropped columns.
|
||||
* The dropped columns are present in column definitions and also the `ALTER DROP` statement
|
||||
* (and `ALTER ADD` if the column has been readded) to the description.
|
||||
* (and `ALTER ADD` if the column has been re-added) to the description.
|
||||
*/
|
||||
virtual std::ostream& describe(replica::database& db, std::ostream& os, bool with_internals) const override;
|
||||
friend bool operator==(const schema&, const schema&);
|
||||
|
||||
@@ -405,5 +405,5 @@ deserialize_gc_clock_duration_value(Input& in) {
|
||||
}
|
||||
|
||||
/*
|
||||
* Import the auto generated forward decleration code
|
||||
* Import the auto generated forward declaration code
|
||||
*/
|
||||
|
||||
@@ -2688,7 +2688,7 @@ void storage_proxy_stats::stats::register_stats() {
|
||||
{storage_proxy_stats::current_scheduling_group_label()}),
|
||||
|
||||
sm::make_total_operations("cas_dropped_prune", cas_coordinator_dropped_prune,
|
||||
sm::description("how many times a coordinator did not perfom prune after cas"),
|
||||
sm::description("how many times a coordinator did not perform prune after cas"),
|
||||
{storage_proxy_stats::current_scheduling_group_label()}).set_skip_when_empty(),
|
||||
|
||||
sm::make_total_operations("cas_total_operations", cas_total_operations,
|
||||
@@ -2700,7 +2700,7 @@ void storage_proxy_stats::stats::register_stats() {
|
||||
{storage_proxy_stats::current_scheduling_group_label()}).set_skip_when_empty(),
|
||||
|
||||
sm::make_gauge("cas_background", [this] { return cas_total_running - cas_foreground; },
|
||||
sm::description("how many paxos operations are still running after a result was alredy returned"),
|
||||
sm::description("how many paxos operations are still running after a result was already returned"),
|
||||
{storage_proxy_stats::current_scheduling_group_label()}).set_skip_when_empty(),
|
||||
});
|
||||
|
||||
@@ -2738,7 +2738,7 @@ void storage_proxy_stats::stats::register_stats() {
|
||||
{storage_proxy_stats::current_scheduling_group_label()}).set_skip_when_empty(),
|
||||
|
||||
sm::make_total_operations("cas_dropped_prune", cas_replica_dropped_prune,
|
||||
sm::description("how many times a coordinator did not perfom prune after cas"),
|
||||
sm::description("how many times a coordinator did not perform prune after cas"),
|
||||
{storage_proxy_stats::current_scheduling_group_label()}).set_skip_when_empty(),
|
||||
});
|
||||
_metrics = std::exchange(new_metrics, {});
|
||||
|
||||
@@ -5968,7 +5968,7 @@ storage_service::get_new_source_ranges(locator::vnode_effective_replication_map_
|
||||
|
||||
future<> storage_service::move(token new_token) {
|
||||
return run_with_api_lock(sstring("move"), [] (storage_service& ss) mutable {
|
||||
return make_exception_future<>(std::runtime_error("Move opeartion is not supported only more"));
|
||||
return make_exception_future<>(std::runtime_error("Move operation is not supported only more"));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
* @param last_event_nanos a reference to the last nanos to align the given time point to.
|
||||
* @param tp the amount of time passed since the Epoch that will be used for the calculation.
|
||||
*
|
||||
* @return the monotonically increasing vlaue in 100s of ns based on the
|
||||
* @return the monotonically increasing value in 100s of ns based on the
|
||||
* given time stamp and on the "nanos" value of the previous event.
|
||||
*/
|
||||
static std::chrono::system_clock::time_point make_monotonic_UUID_tp(int64_t& last_event_nanos, std::chrono::system_clock::time_point tp) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# Tests for the various operations (GetItem, Query, Scan) with a
|
||||
# ProjectionExpression parameter.
|
||||
#
|
||||
# ProjectionExpression is an expension of the legacy AttributesToGet
|
||||
# ProjectionExpression is an expansion of the legacy AttributesToGet
|
||||
# parameter. Both parameters request that only a subset of the attributes
|
||||
# be fetched for each item, instead of all of them. But while AttributesToGet
|
||||
# was limited to top-level attributes, ProjectionExpression can request also
|
||||
|
||||
@@ -37,7 +37,7 @@ def with_tracing(rest_api):
|
||||
response = requests.post(rest_api+'/storage_service/trace_probability?probability=1')
|
||||
if response.status_code != 200:
|
||||
pytest.skip('Failed to enable tracing')
|
||||
# verify tha tracing is really enabled
|
||||
# verify that tracing is really enabled
|
||||
response = requests.get(rest_api+'/storage_service/trace_probability')
|
||||
if response.status_code != 200 or response.content.decode('utf-8') != '1':
|
||||
pytest.skip('Failed to verify tracing')
|
||||
|
||||
@@ -214,7 +214,7 @@ static void test_vector_deserializer(const std::vector<T>& v) {
|
||||
|
||||
auto required = [] (bool x) {
|
||||
if (!x) {
|
||||
throw std::runtime_error(format("failed requirment"));
|
||||
throw std::runtime_error(format("failed requirement"));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -269,7 +269,7 @@ static void test_reverse_vector_deserializer(const std::vector<T>& v) {
|
||||
|
||||
auto required = [] (bool x) {
|
||||
if (!x) {
|
||||
throw std::runtime_error(format("failed requirment"));
|
||||
throw std::runtime_error(format("failed requirement"));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -850,7 +850,7 @@ def testMultipleOperationOnMapWithinTheSameQuery(cql, test_keyspace):
|
||||
execute(cql, table, "UPDATE %s SET m = m + ?, m[?] = ? WHERE pk = ?", {4: 8}, 4, 6, 1)
|
||||
assert_rows(execute(cql, table, "SELECT * FROM %s WHERE pk = ?", 1) , [1, {0: 1, 1: 2, 3: 4, 4: 8}])
|
||||
|
||||
# Checks that, as tombstones win over updates for the same timestamp, the removed element is not readded
|
||||
# Checks that, as tombstones win over updates for the same timestamp, the removed element is not re-added
|
||||
execute(cql, table, "UPDATE %s SET m = m - ?, m[?] = ? WHERE pk = ?", {4}, 4, 9, 1)
|
||||
assert_rows(execute(cql, table, "SELECT * FROM %s WHERE pk = ?", 1) , [1, {0: 1, 1: 2, 3: 4}])
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ def delete_request(cql, *path):
|
||||
|
||||
|
||||
# Get column family's metric.
|
||||
# metric - name of matric
|
||||
# metric - name of metric
|
||||
# table - (optional) column family name to add to request's path
|
||||
# Expected format: `keyspace.name`
|
||||
def get_column_family_metric(cql, metric, table=None):
|
||||
|
||||
@@ -88,7 +88,7 @@ def table1(cql, test_keyspace):
|
||||
|
||||
# Although the "!=" operator exists in the parser and might be allowed in
|
||||
# other places (e.g., LWT), it is *NOT* supported in WHERE clauses - not
|
||||
# for filtering, and also not in relations tha don't need filtering
|
||||
# for filtering, and also not in relations that don't need filtering
|
||||
# (on partition keys or tokens). It is not supported in either Cassandra or
|
||||
# Scylla, and there are no plans to add this support, so for now the test
|
||||
# verifies that at least we get the expected error.
|
||||
|
||||
@@ -355,7 +355,7 @@ def test_oversized_base_regular_view_key(cql, test_keyspace, cassandra_bug):
|
||||
# building*- i.e., pre-existing data in the base table that needs to be
|
||||
# copied to the view. The view building cannot return an error to the user,
|
||||
# but we do expect it to skip the problematic row and continue to complete
|
||||
# the rest of the vew build.
|
||||
# the rest of the view build.
|
||||
@pytest.mark.xfail(reason="issue #8627")
|
||||
# This test currently breaks the build (it repeats a failing build step,
|
||||
# and never complete) and we cannot quickly recognize this failure, so
|
||||
|
||||
@@ -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 anything but a
|
||||
-- Compare with another column: cassandra doesn't 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;
|
||||
|
||||
@@ -1489,7 +1489,7 @@ OK
|
||||
|-------------+-----|
|
||||
| False | 5 |
|
||||
+-------------+-----+
|
||||
> -- Compare with another column: cassandra doesnt allow anything but a
|
||||
> -- Compare with another column: cassandra doesn't allow anything but a
|
||||
> -- constant on the right hand side :(
|
||||
> update lwt set i = 7 where a = 1 if i = t;
|
||||
<Error from server: code=2000 [Syntax error in CQL query] message="line 1:41 no viable alternative at input ';'">
|
||||
|
||||
@@ -1225,7 +1225,7 @@ class ScyllaClusterManager:
|
||||
expected_error = data["expected_error"]
|
||||
self.logger.info("_cluster_remove_node %s with initiator %s", to_remove, initiator)
|
||||
|
||||
# initate remove
|
||||
# initiate remove
|
||||
try:
|
||||
await self.cluster.api.remove_node(initiator.ip_addr, to_remove.host_id, ignore_dead,
|
||||
timeout=ScyllaServer.TOPOLOGY_TIMEOUT)
|
||||
|
||||
@@ -49,17 +49,17 @@ async def test_cdc_generations_are_published(request, manager: ManagerClient):
|
||||
logger.info("Bootstrapping first node")
|
||||
servers = [await manager.server_add()]
|
||||
gen_timestamps = await wait_for(new_gen_appeared, time.time() + 60)
|
||||
logger.info(f"Timestamps after boostrapping first node: {gen_timestamps}")
|
||||
logger.info(f"Timestamps after bootstrapping first node: {gen_timestamps}")
|
||||
|
||||
logger.info("Bootstrapping second node")
|
||||
servers += [await manager.server_add()]
|
||||
gen_timestamps = await wait_for(new_gen_appeared, time.time() + 60)
|
||||
logger.info(f"Timestamps after boostrapping second node: {gen_timestamps}")
|
||||
logger.info(f"Timestamps after bootstrapping second node: {gen_timestamps}")
|
||||
|
||||
logger.info("Bootstrapping third node")
|
||||
servers += [await manager.server_add()]
|
||||
gen_timestamps = await wait_for(new_gen_appeared, time.time() + 60)
|
||||
logger.info(f"Timestamps after boostrapping third node: {gen_timestamps}")
|
||||
logger.info(f"Timestamps after bootstrapping third node: {gen_timestamps}")
|
||||
|
||||
logger.info(f"Stopping node {servers[0]}")
|
||||
await manager.server_stop_gracefully(servers[0].server_id)
|
||||
|
||||
@@ -185,7 +185,7 @@ class iterator_checker {
|
||||
_pos--;
|
||||
|
||||
if (k != (unsigned long)(*_pos)) {
|
||||
fmt::print("iterator backward mis {} <- {}\n", (unsigned long)k, (unsigned long)(*_pos));
|
||||
fmt::print("iterator backward miss {} <- {}\n", (unsigned long)k, (unsigned long)(*_pos));
|
||||
valid = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ for pkg in $PKGS; do
|
||||
dirname=$(basename "$pkg"| sed -e "s/-$VERSION_ESC-$RELEASE_ESC\.[^.]*\.tar\.gz//")
|
||||
dirname=${dirname/#$PRODUCT/scylla}
|
||||
if [ ! -d "$BASEDIR/$dirname" ]; then
|
||||
echo "Directory $dirname not found in $pkg, the pacakge may corrupted."
|
||||
echo "Directory $dirname not found in $pkg, the package might be corrupted."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -23,7 +23,7 @@ Options:
|
||||
--prefix /prefix directory prefix (default /usr)
|
||||
--python3 /opt/python3 path of the python3 interpreter relative to install root (default /opt/scylladb/python3/bin/python3)
|
||||
--housekeeping enable housekeeping service
|
||||
--nonroot install Scylla without required root priviledge
|
||||
--nonroot install Scylla without required root privilege
|
||||
--sysconfdir /etc/sysconfig specify sysconfig directory name
|
||||
--supervisor enable supervisor to manage scylla processes
|
||||
--supervisor-log-to-stdout logging to stdout on supervisor
|
||||
|
||||
@@ -563,7 +563,7 @@ private:
|
||||
};
|
||||
|
||||
/*
|
||||
* This helper wraps several layouts into one and preceeds them with
|
||||
* This helper wraps several layouts into one and precedes them with
|
||||
* the header. It does nothing but provides a polymorphic calls to the
|
||||
* lower/inner layouts depending on the head.base_layout value.
|
||||
*/
|
||||
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
* welcome (e.g. because it throws)
|
||||
*
|
||||
* Single-elemented array cannot be erased from, just drop it
|
||||
* alltogether if needed
|
||||
* altogether if needed
|
||||
*/
|
||||
void erase(int pos) noexcept {
|
||||
assert(!is_single_element());
|
||||
|
||||
@@ -2006,7 +2006,7 @@ private:
|
||||
* separation key at its 0 position, so it's moving the
|
||||
* whole node anyway.
|
||||
*
|
||||
* In case our right sibling is full there's no choise but
|
||||
* In case our right sibling is full there's no choice but
|
||||
* to grab a key from it and continue. Next time we get
|
||||
* here the right node will be int mergeable state.
|
||||
*/
|
||||
|
||||
@@ -43,7 +43,7 @@ using namespace std::chrono_literals;
|
||||
#ifdef SEASTAR_ASAN_ENABLED
|
||||
#include <sanitizer/asan_interface.h>
|
||||
// For each aligned 8 byte segment, the algorithm used by address
|
||||
// sanitizer can represent any addressable prefix followd by a
|
||||
// sanitizer can represent any addressable prefix followed by a
|
||||
// poisoned suffix. The details are at:
|
||||
// https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm
|
||||
// For us this means that:
|
||||
|
||||
@@ -286,7 +286,7 @@ static tag_set parse_tagging(sstring& body) {
|
||||
try {
|
||||
doc->parse<0>(body.data());
|
||||
} catch (const rapidxml::parse_error& e) {
|
||||
s3l.warn("cannnot parse tagging response: {}", e.what());
|
||||
s3l.warn("cannot parse tagging response: {}", e.what());
|
||||
throw std::runtime_error("cannot parse tagging response");
|
||||
}
|
||||
tag_set tags;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// The purpose is to send small negative values as small unsigned values, so that we save bytes on the wire.
|
||||
// To encode a value n use "(n >> 31) ^ (n << 1)" for 32 bit values, and "(n >> 63) ^ (n << 1)"
|
||||
// for 64 bit values where "^" is the xor operation, "<<" is the left shift operation and ">>" is
|
||||
// the arithemtic right shift operation (highest-order bit is replicated).
|
||||
// the arithmetic right shift operation (highest-order bit is replicated).
|
||||
// Decode with "(n >> 1) ^ -(n & 1)".
|
||||
//
|
||||
|
||||
|
||||
Reference in New Issue
Block a user