Compare commits
101 Commits
next
...
scylla-5.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cfedc5b59 | ||
|
|
606ed61263 | ||
|
|
796e4c39f8 | ||
|
|
960434f784 | ||
|
|
05aed0417a | ||
|
|
9a1fc200e1 | ||
|
|
c7e9bbc377 | ||
|
|
a78dac7ae9 | ||
|
|
0debb419f7 | ||
|
|
0cfb950569 | ||
|
|
eebe77b5b8 | ||
|
|
cf6bcffc1b | ||
|
|
a50b7f3d6a | ||
|
|
0e06025487 | ||
|
|
820b79d56e | ||
|
|
fde4a6e92d | ||
|
|
34b8d4306c | ||
|
|
69e8fb997c | ||
|
|
fbfd91e02f | ||
|
|
4c19b48495 | ||
|
|
9deca4250f | ||
|
|
97ab2a4eb3 | ||
|
|
16a941db3b | ||
|
|
8f60a464a7 | ||
|
|
1e72f9cb5e | ||
|
|
d91da87313 | ||
|
|
c73d59c1cb | ||
|
|
9a6c0a89a0 | ||
|
|
5b7dd00b14 | ||
|
|
237df3b935 | ||
|
|
993d0371d9 | ||
|
|
04167eba68 | ||
|
|
ddf8eaba04 | ||
|
|
d5e5d27929 | ||
|
|
bb69ece13d | ||
|
|
d4268863cd | ||
|
|
8b05c67226 | ||
|
|
3afc58de7d | ||
|
|
496696140b | ||
|
|
3a070380a7 | ||
|
|
7b551d8ce4 | ||
|
|
2018b8fcfd | ||
|
|
20b5aa938e | ||
|
|
f519580252 | ||
|
|
46c0a1cc0a | ||
|
|
a822282fde | ||
|
|
bc5af9fdea | ||
|
|
c8bb147f84 | ||
|
|
dc92ec4c8b | ||
|
|
8f7e3275a2 | ||
|
|
40a1905a2d | ||
|
|
4e2c436222 | ||
|
|
68be369f93 | ||
|
|
0f7adb5f47 | ||
|
|
82dc8357ef | ||
|
|
12a58957e2 | ||
|
|
3423ad6e38 | ||
|
|
64001719fa | ||
|
|
cc3d368bc8 | ||
|
|
d957b0044b | ||
|
|
d4ed67bd47 | ||
|
|
0cd6341cae | ||
|
|
23d8852a82 | ||
|
|
88016de43e | ||
|
|
bdecf4318a | ||
|
|
72bf244ad1 | ||
|
|
ee82323599 | ||
|
|
2f78df92ab | ||
|
|
e2809674d2 | ||
|
|
0295d0c5c8 | ||
|
|
fa94222662 | ||
|
|
dff7f3c5ba | ||
|
|
3723713130 | ||
|
|
03f8411e38 | ||
|
|
0e391d67d1 | ||
|
|
f76989285e | ||
|
|
9deeeb4db1 | ||
|
|
1f3196735f | ||
|
|
abb6817261 | ||
|
|
d3fd090429 | ||
|
|
3e7c57d162 | ||
|
|
f878a34da3 | ||
|
|
eaded57b2e | ||
|
|
25d2da08d1 | ||
|
|
9b1a570f6f | ||
|
|
426d045249 | ||
|
|
86dbbf12cc | ||
|
|
b05903eddd | ||
|
|
26ead53304 | ||
|
|
f60bab9471 | ||
|
|
66f34245fc | ||
|
|
4047528bd9 | ||
|
|
1a82c61452 | ||
|
|
3d9800eb1c | ||
|
|
c48e9b47dd | ||
|
|
2eadaad9f7 | ||
|
|
d10aee15e7 | ||
|
|
9e017cb1e6 | ||
|
|
b8504cc9b2 | ||
|
|
856703a85e | ||
|
|
86a6c1fb2b |
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,6 +1,6 @@
|
||||
[submodule "seastar"]
|
||||
path = seastar
|
||||
url = ../seastar
|
||||
url = ../scylla-seastar
|
||||
ignore = dirty
|
||||
[submodule "swagger-ui"]
|
||||
path = swagger-ui
|
||||
|
||||
@@ -60,7 +60,7 @@ fi
|
||||
|
||||
# Default scylla product/version tags
|
||||
PRODUCT=scylla
|
||||
VERSION=5.1.0-dev
|
||||
VERSION=5.1.1
|
||||
|
||||
if test -f version
|
||||
then
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "expressions.hh"
|
||||
#include "conditions.hh"
|
||||
#include "cql3/constants.hh"
|
||||
#include "cql3/util.hh"
|
||||
#include <optional>
|
||||
#include "utils/overloaded_functor.hh"
|
||||
#include <seastar/json/json_elements.hh>
|
||||
@@ -438,6 +439,11 @@ future<executor::request_return_type> executor::describe_table(client_state& cli
|
||||
rjson::add(table_description, "BillingModeSummary", rjson::empty_object());
|
||||
rjson::add(table_description["BillingModeSummary"], "BillingMode", "PAY_PER_REQUEST");
|
||||
rjson::add(table_description["BillingModeSummary"], "LastUpdateToPayPerRequestDateTime", rjson::value(creation_date_seconds));
|
||||
// In PAY_PER_REQUEST billing mode, provisioned capacity should return 0
|
||||
rjson::add(table_description, "ProvisionedThroughput", rjson::empty_object());
|
||||
rjson::add(table_description["ProvisionedThroughput"], "ReadCapacityUnits", 0);
|
||||
rjson::add(table_description["ProvisionedThroughput"], "WriteCapacityUnits", 0);
|
||||
rjson::add(table_description["ProvisionedThroughput"], "NumberOfDecreasesToday", 0);
|
||||
|
||||
std::unordered_map<std::string,std::string> key_attribute_types;
|
||||
// Add base table's KeySchema and collect types for AttributeDefinitions:
|
||||
@@ -460,6 +466,11 @@ future<executor::request_return_type> executor::describe_table(client_state& cli
|
||||
rjson::add(view_entry, "IndexArn", generate_arn_for_index(*schema, index_name));
|
||||
// Add indexes's KeySchema and collect types for AttributeDefinitions:
|
||||
describe_key_schema(view_entry, *vptr, key_attribute_types);
|
||||
// Add projection type
|
||||
rjson::value projection = rjson::empty_object();
|
||||
rjson::add(projection, "ProjectionType", "ALL");
|
||||
// FIXME: we have to get ProjectionType from the schema when it is added
|
||||
rjson::add(view_entry, "Projection", std::move(projection));
|
||||
// Local secondary indexes are marked by an extra '!' sign occurring before the ':' delimiter
|
||||
rjson::value& index_array = (delim_it > 1 && cf_name[delim_it-1] == '!') ? lsi_array : gsi_array;
|
||||
rjson::push_back(index_array, std::move(view_entry));
|
||||
@@ -917,9 +928,10 @@ static future<executor::request_return_type> create_table_on_shard0(tracing::tra
|
||||
if (!range_key.empty() && range_key != view_hash_key && range_key != view_range_key) {
|
||||
add_column(view_builder, range_key, attribute_definitions, column_kind::clustering_key);
|
||||
}
|
||||
sstring where_clause = "\"" + view_hash_key + "\" IS NOT NULL";
|
||||
sstring where_clause = format("{} IS NOT NULL", cql3::util::maybe_quote(view_hash_key));
|
||||
if (!view_range_key.empty()) {
|
||||
where_clause = where_clause + " AND \"" + view_hash_key + "\" IS NOT NULL";
|
||||
where_clause = format("{} AND {} IS NOT NULL", where_clause,
|
||||
cql3::util::maybe_quote(view_range_key));
|
||||
}
|
||||
where_clauses.push_back(std::move(where_clause));
|
||||
view_builders.emplace_back(std::move(view_builder));
|
||||
@@ -974,9 +986,10 @@ static future<executor::request_return_type> create_table_on_shard0(tracing::tra
|
||||
// Note above we don't need to add virtual columns, as all
|
||||
// base columns were copied to view. TODO: reconsider the need
|
||||
// for virtual columns when we support Projection.
|
||||
sstring where_clause = "\"" + view_hash_key + "\" IS NOT NULL";
|
||||
sstring where_clause = format("{} IS NOT NULL", cql3::util::maybe_quote(view_hash_key));
|
||||
if (!view_range_key.empty()) {
|
||||
where_clause = where_clause + " AND \"" + view_range_key + "\" IS NOT NULL";
|
||||
where_clause = format("{} AND {} IS NOT NULL", where_clause,
|
||||
cql3::util::maybe_quote(view_range_key));
|
||||
}
|
||||
where_clauses.push_back(std::move(where_clause));
|
||||
view_builders.emplace_back(std::move(view_builder));
|
||||
|
||||
@@ -80,8 +80,10 @@ struct compaction_data {
|
||||
}
|
||||
|
||||
void stop(sstring reason) {
|
||||
stop_requested = std::move(reason);
|
||||
abort.request_abort();
|
||||
if (!abort.abort_requested()) {
|
||||
stop_requested = std::move(reason);
|
||||
abort.request_abort();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -842,6 +842,20 @@ future<> compaction_manager::really_do_stop() {
|
||||
cmlog.info("Stopped");
|
||||
}
|
||||
|
||||
template <typename Ex>
|
||||
requires std::is_base_of_v<std::exception, Ex> &&
|
||||
requires (const Ex& ex) {
|
||||
{ ex.code() } noexcept -> std::same_as<const std::error_code&>;
|
||||
}
|
||||
auto swallow_enospc(const Ex& ex) noexcept {
|
||||
if (ex.code().value() != ENOSPC) {
|
||||
return make_exception_future<>(std::make_exception_ptr(ex));
|
||||
}
|
||||
|
||||
cmlog.warn("Got ENOSPC on stop, ignoring...");
|
||||
return make_ready_future<>();
|
||||
}
|
||||
|
||||
void compaction_manager::do_stop() noexcept {
|
||||
if (_state == state::none || _state == state::stopped) {
|
||||
return;
|
||||
@@ -849,7 +863,10 @@ void compaction_manager::do_stop() noexcept {
|
||||
|
||||
try {
|
||||
_state = state::stopped;
|
||||
_stop_future = really_do_stop();
|
||||
_stop_future = really_do_stop()
|
||||
.handle_exception_type([] (const std::system_error& ex) { return swallow_enospc(ex); })
|
||||
.handle_exception_type([] (const storage_io_error& ex) { return swallow_enospc(ex); })
|
||||
;
|
||||
} catch (...) {
|
||||
cmlog.error("Failed to stop the manager: {}", std::current_exception());
|
||||
}
|
||||
@@ -1050,7 +1067,7 @@ public:
|
||||
bool performed() const noexcept {
|
||||
return _performed;
|
||||
}
|
||||
|
||||
private:
|
||||
future<> run_offstrategy_compaction(sstables::compaction_data& cdata) {
|
||||
// This procedure will reshape sstables in maintenance set until it's ready for
|
||||
// integration into main set.
|
||||
@@ -1083,6 +1100,7 @@ public:
|
||||
return desc.sstables.size() ? std::make_optional(std::move(desc)) : std::nullopt;
|
||||
};
|
||||
|
||||
std::exception_ptr err;
|
||||
while (auto desc = get_next_job()) {
|
||||
desc->creator = [this, &new_unused_sstables, &t] (shard_id dummy) {
|
||||
auto sst = t.make_sstable();
|
||||
@@ -1091,7 +1109,16 @@ public:
|
||||
};
|
||||
auto input = boost::copy_range<std::unordered_set<sstables::shared_sstable>>(desc->sstables);
|
||||
|
||||
auto ret = co_await sstables::compact_sstables(std::move(*desc), cdata, t);
|
||||
sstables::compaction_result ret;
|
||||
try {
|
||||
ret = co_await sstables::compact_sstables(std::move(*desc), cdata, t);
|
||||
} catch (sstables::compaction_stopped_exception&) {
|
||||
// If off-strategy compaction stopped on user request, let's not discard the partial work.
|
||||
// Therefore, both un-reshaped and reshaped data will be integrated into main set, allowing
|
||||
// regular compaction to continue from where off-strategy left off.
|
||||
err = std::current_exception();
|
||||
break;
|
||||
}
|
||||
_performed = true;
|
||||
|
||||
// update list of reshape candidates without input but with output added to it
|
||||
@@ -1128,6 +1155,9 @@ public:
|
||||
for (auto& sst : sstables_to_remove) {
|
||||
sst->mark_for_deletion();
|
||||
}
|
||||
if (err) {
|
||||
co_await coroutine::return_exception_ptr(std::move(err));
|
||||
}
|
||||
}
|
||||
protected:
|
||||
virtual future<compaction_stats_opt> do_run() override {
|
||||
|
||||
@@ -630,6 +630,8 @@ arg_parser.add_argument('--static-yaml-cpp', dest='staticyamlcpp', action='store
|
||||
help='Link libyaml-cpp statically')
|
||||
arg_parser.add_argument('--tests-debuginfo', action='store', dest='tests_debuginfo', type=int, default=0,
|
||||
help='Enable(1)/disable(0)compiler debug information generation for tests')
|
||||
arg_parser.add_argument('--perf-tests-debuginfo', action='store', dest='perf_tests_debuginfo', type=int, default=0,
|
||||
help='Enable(1)/disable(0)compiler debug information generation for perf tests')
|
||||
arg_parser.add_argument('--python', action='store', dest='python', default='python3',
|
||||
help='Python3 path')
|
||||
arg_parser.add_argument('--split-dwarf', dest='split_dwarf', action='store_true', default=False,
|
||||
@@ -1423,6 +1425,7 @@ linker_flags = linker_flags(compiler=args.cxx)
|
||||
|
||||
dbgflag = '-g -gz' if args.debuginfo else ''
|
||||
tests_link_rule = 'link' if args.tests_debuginfo else 'link_stripped'
|
||||
perf_tests_link_rule = 'link' if args.perf_tests_debuginfo else 'link_stripped'
|
||||
|
||||
# Strip if debuginfo is disabled, otherwise we end up with partial
|
||||
# debug info from the libraries we static link with
|
||||
@@ -1954,7 +1957,8 @@ with open(buildfile, 'w') as f:
|
||||
# So we strip the tests by default; The user can very
|
||||
# quickly re-link the test unstripped by adding a "_g"
|
||||
# to the test name, e.g., "ninja build/release/testname_g"
|
||||
f.write('build $builddir/{}/{}: {}.{} {} | {} {}\n'.format(mode, binary, tests_link_rule, mode, str.join(' ', objs), seastar_dep, seastar_testing_dep))
|
||||
link_rule = perf_tests_link_rule if binary.startswith('test/perf/') else tests_link_rule
|
||||
f.write('build $builddir/{}/{}: {}.{} {} | {} {}\n'.format(mode, binary, link_rule, mode, str.join(' ', objs), seastar_dep, seastar_testing_dep))
|
||||
f.write(' libs = {}\n'.format(local_libs))
|
||||
f.write('build $builddir/{}/{}_g: {}.{} {} | {} {}\n'.format(mode, binary, regular_link_rule, mode, str.join(' ', objs), seastar_dep, seastar_testing_dep))
|
||||
f.write(' libs = {}\n'.format(local_libs))
|
||||
|
||||
@@ -1396,7 +1396,7 @@ serviceLevelOrRoleName returns [sstring name]
|
||||
std::transform($name.begin(), $name.end(), $name.begin(), ::tolower); }
|
||||
| t=STRING_LITERAL { $name = sstring($t.text); }
|
||||
| t=QUOTED_NAME { $name = sstring($t.text); }
|
||||
| k=unreserved_keyword { $name = sstring($t.text);
|
||||
| k=unreserved_keyword { $name = k;
|
||||
std::transform($name.begin(), $name.end(), $name.begin(), ::tolower);}
|
||||
| QMARK {add_recognition_error("Bind variables cannot be used for service levels or role names");}
|
||||
;
|
||||
|
||||
@@ -435,7 +435,7 @@ bool result_set_builder::restrictions_filter::do_filter(const selection& selecti
|
||||
clustering_key_prefix ckey = clustering_key_prefix::from_exploded(clustering_key);
|
||||
// FIXME: push to upper layer so it happens once per row
|
||||
auto static_and_regular_columns = expr::get_non_pk_values(selection, static_row, row);
|
||||
return expr::is_satisfied_by(
|
||||
bool multi_col_clustering_satisfied = expr::is_satisfied_by(
|
||||
clustering_columns_restrictions,
|
||||
expr::evaluation_inputs{
|
||||
.partition_key = &partition_key,
|
||||
@@ -444,6 +444,9 @@ bool result_set_builder::restrictions_filter::do_filter(const selection& selecti
|
||||
.selection = &selection,
|
||||
.options = &_options,
|
||||
});
|
||||
if (!multi_col_clustering_satisfied) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
auto static_row_iterator = static_row.iterator();
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "tombstone_gc.hh"
|
||||
#include "db/per_partition_rate_limit_extension.hh"
|
||||
#include "db/per_partition_rate_limit_options.hh"
|
||||
#include "utils/bloom_calculations.hh"
|
||||
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
|
||||
@@ -152,6 +153,16 @@ void cf_prop_defs::validate(const data_dictionary::database db, sstring ks_name,
|
||||
throw exceptions::configuration_exception(KW_MAX_INDEX_INTERVAL + " must be greater than " + KW_MIN_INDEX_INTERVAL);
|
||||
}
|
||||
|
||||
if (get_simple(KW_BF_FP_CHANCE)) {
|
||||
double bloom_filter_fp_chance = get_double(KW_BF_FP_CHANCE, 0/*not used*/);
|
||||
double min_bloom_filter_fp_chance = utils::bloom_calculations::min_supported_bloom_filter_fp_chance();
|
||||
if (bloom_filter_fp_chance <= min_bloom_filter_fp_chance || bloom_filter_fp_chance > 1.0) {
|
||||
throw exceptions::configuration_exception(format(
|
||||
"{} must be larger than {} and less than or equal to 1.0 (got {})",
|
||||
KW_BF_FP_CHANCE, min_bloom_filter_fp_chance, bloom_filter_fp_chance));
|
||||
}
|
||||
}
|
||||
|
||||
speculative_retry::from_sstring(get_string(KW_SPECULATIVE_RETRY, speculative_retry(speculative_retry::type::NONE, 0).to_sstring()));
|
||||
}
|
||||
|
||||
|
||||
@@ -109,9 +109,6 @@ future<> modification_statement::check_access(query_processor& qp, const service
|
||||
|
||||
future<std::vector<mutation>>
|
||||
modification_statement::get_mutations(query_processor& qp, const query_options& options, db::timeout_clock::time_point timeout, bool local, int64_t now, service::query_state& qs) const {
|
||||
if (_restrictions->range_or_slice_eq_null(options)) { // See #7852 and #9290.
|
||||
throw exceptions::invalid_request_exception("Invalid null value in condition for a key column");
|
||||
}
|
||||
auto cl = options.get_consistency();
|
||||
auto json_cache = maybe_prepare_json_cache(options);
|
||||
auto keys = build_partition_keys(options, json_cache);
|
||||
@@ -260,6 +257,10 @@ modification_statement::do_execute(query_processor& qp, service::query_state& qs
|
||||
|
||||
inc_cql_stats(qs.get_client_state().is_internal());
|
||||
|
||||
if (_restrictions->range_or_slice_eq_null(options)) { // See #7852 and #9290.
|
||||
throw exceptions::invalid_request_exception("Invalid null value in condition for a key column");
|
||||
}
|
||||
|
||||
if (has_conditions()) {
|
||||
return execute_with_condition(qp, qs, options);
|
||||
}
|
||||
|
||||
@@ -1571,11 +1571,16 @@ void select_statement::maybe_jsonize_select_clause(data_dictionary::database db,
|
||||
std::vector<data_type> selector_types;
|
||||
std::vector<const column_definition*> defs;
|
||||
selector_names.reserve(_select_clause.size());
|
||||
selector_types.reserve(_select_clause.size());
|
||||
auto selectables = selection::raw_selector::to_selectables(_select_clause, *schema);
|
||||
selection::selector_factories factories(selection::raw_selector::to_selectables(_select_clause, *schema), db, schema, defs);
|
||||
auto selectors = factories.new_instances();
|
||||
for (size_t i = 0; i < selectors.size(); ++i) {
|
||||
selector_names.push_back(selectables[i]->to_string());
|
||||
if (_select_clause[i]->alias) {
|
||||
selector_names.push_back(_select_clause[i]->alias->to_string());
|
||||
} else {
|
||||
selector_names.push_back(selectables[i]->to_string());
|
||||
}
|
||||
selector_types.push_back(selectors[i]->get_type());
|
||||
}
|
||||
|
||||
|
||||
@@ -2031,7 +2031,7 @@ future<> db::commitlog::segment_manager::shutdown() {
|
||||
}
|
||||
}
|
||||
co_await _shutdown_promise->get_shared_future();
|
||||
clogger.info("Commitlog shutdown complete");
|
||||
clogger.debug("Commitlog shutdown complete");
|
||||
}
|
||||
|
||||
void db::commitlog::segment_manager::add_file_to_dispose(named_file f, dispose_mode mode) {
|
||||
|
||||
@@ -899,6 +899,8 @@ db::config::config(std::shared_ptr<db::extensions> exts)
|
||||
"Ignore truncation record stored in system tables as if tables were never truncated.")
|
||||
, force_schema_commit_log(this, "force_schema_commit_log", value_status::Used, false,
|
||||
"Use separate schema commit log unconditionally rater than after restart following discovery of cluster-wide support for it.")
|
||||
, cache_index_pages(this, "cache_index_pages", liveness::LiveUpdate, value_status::Used, true,
|
||||
"Keep SSTable index pages in the global cache after a SSTable read. Expected to improve performance for workloads with big partitions, but may degrade performance for workloads with small partitions.")
|
||||
, default_log_level(this, "default_log_level", value_status::Used)
|
||||
, logger_log_level(this, "logger_log_level", value_status::Used)
|
||||
, log_to_stdout(this, "log_to_stdout", value_status::Used)
|
||||
|
||||
@@ -379,6 +379,8 @@ public:
|
||||
named_value<bool> ignore_truncation_record;
|
||||
named_value<bool> force_schema_commit_log;
|
||||
|
||||
named_value<bool> cache_index_pages;
|
||||
|
||||
seastar::logging_settings logging_settings(const log_cli::options&) const;
|
||||
|
||||
const db::extensions& extensions() const;
|
||||
|
||||
@@ -123,6 +123,9 @@ const column_definition* view_info::view_column(const column_definition& base_de
|
||||
|
||||
void view_info::set_base_info(db::view::base_info_ptr base_info) {
|
||||
_base_info = std::move(base_info);
|
||||
// Forget the cached objects which may refer to the base schema.
|
||||
_select_statement = nullptr;
|
||||
_partition_slice = std::nullopt;
|
||||
}
|
||||
|
||||
// A constructor for a base info that can facilitate reads and writes from the materialized view.
|
||||
@@ -868,13 +871,18 @@ void view_updates::generate_update(
|
||||
bool same_row = true;
|
||||
for (auto col_id : col_ids) {
|
||||
auto* after = update.cells().find_cell(col_id);
|
||||
// Note: multi-cell columns can't be part of the primary key.
|
||||
auto& cdef = _base->regular_column_at(col_id);
|
||||
if (existing) {
|
||||
auto* before = existing->cells().find_cell(col_id);
|
||||
// Note that this cell is necessarily atomic, because col_ids are
|
||||
// view key columns, and keys must be atomic.
|
||||
if (before && before->as_atomic_cell(cdef).is_live()) {
|
||||
if (after && after->as_atomic_cell(cdef).is_live()) {
|
||||
auto cmp = compare_atomic_cell_for_merge(before->as_atomic_cell(cdef), after->as_atomic_cell(cdef));
|
||||
// We need to compare just the values of the keys, not
|
||||
// metadata like the timestamp. This is because below,
|
||||
// if the old and new view row have the same key, we need
|
||||
// to be sure to reach the update_entry() case.
|
||||
auto cmp = compare_unsigned(before->as_atomic_cell(cdef).value(), after->as_atomic_cell(cdef).value());
|
||||
if (cmp != 0) {
|
||||
same_row = false;
|
||||
}
|
||||
@@ -894,7 +902,13 @@ void view_updates::generate_update(
|
||||
if (same_row) {
|
||||
update_entry(base_key, update, *existing, now);
|
||||
} else {
|
||||
replace_entry(base_key, update, *existing, now);
|
||||
// This code doesn't work if the old and new view row have the
|
||||
// same key, because if they do we get both data and tombstone
|
||||
// for the same timestamp (now) and the tombstone wins. This
|
||||
// is why we need the "same_row" case above - it's not just a
|
||||
// performance optimization.
|
||||
delete_old_entry(base_key, *existing, update, now);
|
||||
create_entry(base_key, update, now);
|
||||
}
|
||||
} else {
|
||||
delete_old_entry(base_key, *existing, update, now);
|
||||
@@ -2056,15 +2070,20 @@ public:
|
||||
// Called in the context of a seastar::thread.
|
||||
void view_builder::execute(build_step& step, exponential_backoff_retry r) {
|
||||
gc_clock::time_point now = gc_clock::now();
|
||||
auto consumer = compact_for_query_v2<view_builder::consumer>(
|
||||
auto compaction_state = make_lw_shared<compact_for_query_state_v2>(
|
||||
*step.reader.schema(),
|
||||
now,
|
||||
step.pslice,
|
||||
batch_size,
|
||||
query::max_partitions,
|
||||
view_builder::consumer{*this, step, now});
|
||||
consumer.consume_new_partition(step.current_key); // Initialize the state in case we're resuming a partition
|
||||
query::max_partitions);
|
||||
auto consumer = compact_for_query_v2<view_builder::consumer>(compaction_state, view_builder::consumer{*this, step, now});
|
||||
auto built = step.reader.consume_in_thread(std::move(consumer));
|
||||
if (auto ds = std::move(*compaction_state).detach_state()) {
|
||||
if (ds->current_tombstone) {
|
||||
step.reader.unpop_mutation_fragment(mutation_fragment_v2(*step.reader.schema(), step.reader.permit(), std::move(*ds->current_tombstone)));
|
||||
}
|
||||
step.reader.unpop_mutation_fragment(mutation_fragment_v2(*step.reader.schema(), step.reader.permit(), std::move(ds->partition_start)));
|
||||
}
|
||||
|
||||
_as.check();
|
||||
|
||||
|
||||
@@ -154,10 +154,7 @@ private:
|
||||
void delete_old_entry(const partition_key& base_key, const clustering_row& existing, const clustering_row& update, gc_clock::time_point now);
|
||||
void do_delete_old_entry(const partition_key& base_key, const clustering_row& existing, const clustering_row& update, gc_clock::time_point now);
|
||||
void update_entry(const partition_key& base_key, const clustering_row& update, const clustering_row& existing, gc_clock::time_point now);
|
||||
void replace_entry(const partition_key& base_key, const clustering_row& update, const clustering_row& existing, gc_clock::time_point now) {
|
||||
create_entry(base_key, update, now);
|
||||
delete_old_entry(base_key, existing, update, now);
|
||||
}
|
||||
void update_entry_for_computed_column(const partition_key& base_key, const clustering_row& update, const std::optional<clustering_row>& existing, gc_clock::time_point now);
|
||||
};
|
||||
|
||||
class view_update_builder {
|
||||
|
||||
23
dist/common/scripts/scylla_raid_setup
vendored
23
dist/common/scripts/scylla_raid_setup
vendored
@@ -16,7 +16,7 @@ import stat
|
||||
import distro
|
||||
from pathlib import Path
|
||||
from scylla_util import *
|
||||
from subprocess import run
|
||||
from subprocess import run, SubprocessError
|
||||
|
||||
if __name__ == '__main__':
|
||||
if os.getuid() > 0:
|
||||
@@ -137,7 +137,9 @@ if __name__ == '__main__':
|
||||
# stalling. The minimum block size for crc enabled filesystems is 1024,
|
||||
# and it also cannot be smaller than the sector size.
|
||||
block_size = max(1024, sector_size)
|
||||
run('udevadm settle', shell=True, check=True)
|
||||
run(f'mkfs.xfs -b size={block_size} {fsdev} -f -K', shell=True, check=True)
|
||||
run('udevadm settle', shell=True, check=True)
|
||||
|
||||
if is_debian_variant():
|
||||
confpath = '/etc/mdadm/mdadm.conf'
|
||||
@@ -153,6 +155,11 @@ if __name__ == '__main__':
|
||||
os.makedirs(mount_at, exist_ok=True)
|
||||
|
||||
uuid = out(f'blkid -s UUID -o value {fsdev}')
|
||||
if not uuid:
|
||||
raise Exception(f'Failed to get UUID of {fsdev}')
|
||||
|
||||
uuidpath = f'/dev/disk/by-uuid/{uuid}'
|
||||
|
||||
after = 'local-fs.target'
|
||||
wants = ''
|
||||
if raid and args.raid_level != '0':
|
||||
@@ -169,7 +176,7 @@ After={after}{wants}
|
||||
DefaultDependencies=no
|
||||
|
||||
[Mount]
|
||||
What=/dev/disk/by-uuid/{uuid}
|
||||
What={uuidpath}
|
||||
Where={mount_at}
|
||||
Type=xfs
|
||||
Options=noatime{opt_discard}
|
||||
@@ -191,8 +198,16 @@ WantedBy=multi-user.target
|
||||
systemd_unit.reload()
|
||||
if args.raid_level != '0':
|
||||
md_service.start()
|
||||
mount = systemd_unit(mntunit_bn)
|
||||
mount.start()
|
||||
try:
|
||||
mount = systemd_unit(mntunit_bn)
|
||||
mount.start()
|
||||
except SubprocessError as e:
|
||||
if not os.path.exists(uuidpath):
|
||||
print(f'\nERROR: {uuidpath} is not found\n')
|
||||
elif not stat.S_ISBLK(os.stat(uuidpath).st_mode):
|
||||
print(f'\nERROR: {uuidpath} is not block device\n')
|
||||
raise e
|
||||
|
||||
if args.enable_on_nextboot:
|
||||
mount.enable()
|
||||
uid = pwd.getpwnam('scylla').pw_uid
|
||||
|
||||
@@ -1,58 +1,10 @@
|
||||
### a dictionary of redirections
|
||||
#old path: new path
|
||||
|
||||
# removing the old Monitoring Stack documentation from the ScyllaDB docs
|
||||
|
||||
/stable/operating-scylla/monitoring/index.html: https://monitoring.docs.scylladb.com/stable/
|
||||
/stable/upgrade/upgrade-monitor/index.html: https://monitoring.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-monitor/upgrade-guide-from-monitoring-1.x-to-monitoring-2.x.html: https://monitoring.docs.scylladb.com/stable/upgrade/upgrade-guide-from-monitoring-1.x-to-monitoring-2.x.html
|
||||
/stable/upgrade/upgrade-monitor/upgrade-guide-from-monitoring-2.x-to-monitoring-2.y.html: https://monitoring.docs.scylladb.com/stable/upgrade/upgrade-guide-from-monitoring-2.x-to-monitoring-2.y.html
|
||||
/stable/upgrade/upgrade-monitor/upgrade-guide-from-monitoring-2.x-to-monitoring-3.y.html: https://monitoring.docs.scylladb.com/stable/upgrade/upgrade-guide-from-monitoring-2.x-to-monitoring-3.y.html
|
||||
/stable/upgrade/upgrade-monitor/upgrade-guide-from-monitoring-3.x-to-monitoring-3.y.html: https://monitoring.docs.scylladb.com/stable/upgrade/upgrade-guide-from-monitoring-3.x-to-monitoring-3.y.html
|
||||
|
||||
# removing the old Operator documentation from the ScyllaDB docs
|
||||
|
||||
/stable/operating-scylla/scylla-operator/index.html: https://operator.docs.scylladb.com/stable/
|
||||
|
||||
### removing the old Scylla Manager documentation from the ScyllaDB docs
|
||||
|
||||
/stable/operating-scylla/manager/index.html: https://manager.docs.scylladb.com/
|
||||
/stable/upgrade/upgrade-manager/index.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-maintenance-1.x.y-to-1.x.z/index.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-maintenance-1.x.y-to-1.x.z/upgrade-guide-from-manager-1.x.y-to-1.x.z-CentOS.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-maintenance-1.x.y-to-1.x.z/upgrade-guide-from-manager-1.x.y-to-1.x.z-ubuntu.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-manager-1.0.x-to-1.1.x.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-manager-1.1.x-to-1.2.x.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-1.2-to-1.3/index.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-1.2-to-1.3/upgrade-guide-from-manager-1.2.x-to-1.3.x-CentOS.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-1.2-to-1.3/upgrade-guide-from-manager-1.2.x-to-1.3.x-ubuntu.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-1.2-to-1.3/manager-metric-update-1.2-to-1.3.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-1.3-to-1.4/index.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-1.3-to-1.4/upgrade-guide-from-manager-1.3.x-to-1.4.x-CentOS.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-1.3-to-1.4/upgrade-guide-from-manager-1.3.x-to-1.4.x-ubuntu.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-1.3-to-1.4/manager-metric-update-1.3-to-1.4.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-1.4-to-2.0/index.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-1.4-to-2.0/upgrade-guide-from-manager-1.4.x-to-2.0.x.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-1.4-to-2.0/manager-metric-update-1.4-to-2.0.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-2.x.a-to-2.y.b/index.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-2.x.a-to-2.y.b/upgrade-2.x.a-to-2.y.b.html: https://manager.docs.scylladb.com/stable/upgrade/index.html
|
||||
/stable/upgrade/upgrade-manager/upgrade-guide-from-2.x.a-to-2.y.b/upgrade-row-level-repair.html: https://www.scylladb.com/2019/08/13/scylla-open-source-3-1-efficiently-maintaining-consistency-with-row-level-repair/
|
||||
stable/operating-scylla/manager/2.1/index.html: https://manager.docs.scylladb.com/
|
||||
/stable/operating-scylla/manager/2.1/architecture.html: https://manager.docs.scylladb.com/
|
||||
/stable/operating-scylla/manager/2.1/install.html: https://manager.docs.scylladb.com/stable/install-scylla-manager.html
|
||||
/stable/operating-scylla/manager/2.1/install-agent.html: https://manager.docs.scylladb.com/stable/install-scylla-manager-agent.html
|
||||
/stable/operating-scylla/manager/2.1/add-a-cluster.html: https://manager.docs.scylladb.com/stable/add-a-cluster.html
|
||||
/stable/operating-scylla/manager/2.1/repair.html: https://manager.docs.scylladb.com/stable/repair/index.html
|
||||
/stable/operating-scylla/manager/2.1/backup.html: https://manager.docs.scylladb.com/stable/backup/index.html
|
||||
/stable/operating-scylla/manager/2.1/extract-schema-from-backup.html: https://manager.docs.scylladb.com/stable/sctool/backup.html
|
||||
/stable/operating-scylla/manager/2.1/restore-a-backup.html: https://manager.docs.scylladb.com/stable/restore/index.html
|
||||
/stable/operating-scylla/manager/2.1/health-check.html: https://manager.docs.scylladb.com/stable/health-check.html
|
||||
/stable/operating-scylla/manager/2.1/sctool.html: https://manager.docs.scylladb.com/stable/sctool/index.html
|
||||
/stable/operating-scylla/manager/2.1/monitoring-manager-integration.html: https://manager.docs.scylladb.com/stable/scylla-monitoring.html
|
||||
/stable/operating-scylla/manager/2.1/use-a-remote-db.html: https://manager.docs.scylladb.com/
|
||||
/stable/operating-scylla/manager/2.1/configuration-file.html: https://manager.docs.scylladb.com/stable/config/scylla-manager-config.html
|
||||
/stable/operating-scylla/manager/2.1/agent-configuration-file.html: https://manager.docs.scylladb.com/stable/config/scylla-manager-agent-config.html
|
||||
|
||||
### moving the CQL reference files to the new cql folder
|
||||
|
||||
/stable/getting-started/ddl.html: /stable/cql/ddl.html
|
||||
|
||||
@@ -134,7 +134,7 @@ isolation policy for a specific table can be overridden by tagging the table
|
||||
This section provides only a very brief introduction to Alternator's
|
||||
design. A much more detailed document about the features of the DynamoDB
|
||||
API and how they are, or could be, implemented in Scylla can be found in:
|
||||
https://docs.google.com/document/d/1i4yjF5OSAazAY_-T8CBce9-2ykW4twx_E_Nt2zDoOVs
|
||||
<https://docs.google.com/document/d/1i4yjF5OSAazAY_-T8CBce9-2ykW4twx_E_Nt2zDoOVs>
|
||||
|
||||
Almost all of Alternator's source code (except some initialization code)
|
||||
can be found in the alternator/ subdirectory of Scylla's source code.
|
||||
|
||||
@@ -26,7 +26,7 @@ request for this single URL to many different backend nodes. Such a
|
||||
load-balancing setup is *not* included inside Alternator. You should either
|
||||
set one up, or configure the client library to do the load balancing itself.
|
||||
Instructions for doing this can be found in:
|
||||
https://github.com/scylladb/alternator-load-balancing/
|
||||
<https://github.com/scylladb/alternator-load-balancing/>
|
||||
|
||||
## Write isolation policies
|
||||
|
||||
@@ -125,7 +125,7 @@ All of this is not yet implemented in Alternator.
|
||||
Scylla has an advanced and extensive monitoring framework for inspecting
|
||||
and graphing hundreds of different metrics of Scylla's usage and performance.
|
||||
Scylla's monitoring stack, based on Grafana and Prometheus, is described in
|
||||
https://docs.scylladb.com/operating-scylla/monitoring/.
|
||||
<https://docs.scylladb.com/operating-scylla/monitoring/>.
|
||||
This monitoring stack is different from DynamoDB's offering - but Scylla's
|
||||
is significantly more powerful and gives the user better insights on
|
||||
the internals of the database and its performance.
|
||||
@@ -160,7 +160,7 @@ experimental:
|
||||
One thing that this implementation is still missing is that expiration
|
||||
events appear in the Streams API as normal deletions - without the
|
||||
distinctive marker on deletions which are really expirations.
|
||||
https://github.com/scylladb/scylla/issues/5060
|
||||
<https://github.com/scylladb/scylla/issues/5060>
|
||||
|
||||
* The DynamoDB Streams API for capturing change is supported, but still
|
||||
considered experimental so needs to be enabled explicitly with the
|
||||
@@ -172,12 +172,12 @@ experimental:
|
||||
* While in DynamoDB data usually appears in the stream less than a second
|
||||
after it was written, in Alternator Streams there is currently a 10
|
||||
second delay by default.
|
||||
https://github.com/scylladb/scylla/issues/6929
|
||||
<https://github.com/scylladb/scylla/issues/6929>
|
||||
* Some events are represented differently in Alternator Streams. For
|
||||
example, a single PutItem is represented by a REMOVE + MODIFY event,
|
||||
instead of just a single MODIFY or INSERT.
|
||||
https://github.com/scylladb/scylla/issues/6930
|
||||
https://github.com/scylladb/scylla/issues/6918
|
||||
<https://github.com/scylladb/scylla/issues/6930>
|
||||
<https://github.com/scylladb/scylla/issues/6918>
|
||||
|
||||
## Unimplemented API features
|
||||
|
||||
@@ -189,18 +189,18 @@ they should be easy to detect. Here is a list of these unimplemented features:
|
||||
* Currently in Alternator, a GSI (Global Secondary Index) can only be added
|
||||
to a table at table creation time. Unlike DynamoDB which also allows adding
|
||||
a GSI (but not an LSI) to an existing table using an UpdateTable operation.
|
||||
https://github.com/scylladb/scylla/issues/5022
|
||||
<https://github.com/scylladb/scylla/issues/5022>
|
||||
|
||||
* GSI (Global Secondary Index) and LSI (Local Secondary Index) may be
|
||||
configured to project only a subset of the base-table attributes to the
|
||||
index. This option is not yet respected by Alternator - all attributes
|
||||
are projected. This wastes some disk space when it is not needed.
|
||||
https://github.com/scylladb/scylla/issues/5036
|
||||
<https://github.com/scylladb/scylla/issues/5036>
|
||||
|
||||
* DynamoDB's new multi-item transaction feature (TransactWriteItems,
|
||||
TransactGetItems) is not supported. Note that the older single-item
|
||||
conditional updates feature are fully supported.
|
||||
https://github.com/scylladb/scylla/issues/5064
|
||||
<https://github.com/scylladb/scylla/issues/5064>
|
||||
|
||||
* Alternator does not yet support the DynamoDB API calls that control which
|
||||
table is available in which data center (DC): CreateGlobalTable,
|
||||
@@ -211,19 +211,19 @@ they should be easy to detect. Here is a list of these unimplemented features:
|
||||
If a DC is added after a table is created, the table won't be visible from
|
||||
the new DC and changing that requires a CQL "ALTER TABLE" statement to
|
||||
modify the table's replication strategy.
|
||||
https://github.com/scylladb/scylla/issues/5062
|
||||
<https://github.com/scylladb/scylla/issues/5062>
|
||||
|
||||
* Recently DynamoDB added support, in addition to the DynamoDB Streams API,
|
||||
also for the similar Kinesis Streams. Alternator doesn't support this yet,
|
||||
and the related operations DescribeKinesisStreamingDestination,
|
||||
DisableKinesisStreamingDestination, and EnableKinesisStreamingDestination.
|
||||
https://github.com/scylladb/scylla/issues/8786
|
||||
<https://github.com/scylladb/scylla/issues/8786>
|
||||
|
||||
* The on-demand backup APIs are not supported: CreateBackup, DescribeBackup,
|
||||
DeleteBackup, ListBackups, RestoreTableFromBackup.
|
||||
For now, users can use Scylla's existing backup solutions such as snapshots
|
||||
or Scylla Manager.
|
||||
https://github.com/scylladb/scylla/issues/5063
|
||||
<https://github.com/scylladb/scylla/issues/5063>
|
||||
|
||||
* Continuous backup (the ability to restore any point in time) is also not
|
||||
supported: UpdateContinuousBackups, DescribeContinuousBackups,
|
||||
@@ -237,28 +237,28 @@ they should be easy to detect. Here is a list of these unimplemented features:
|
||||
BillingMode option is ignored by Alternator, and if a provisioned throughput
|
||||
is specified, it is ignored. Requests which are asked to return the amount
|
||||
of provisioned throughput used by the request do not return it in Alternator.
|
||||
https://github.com/scylladb/scylla/issues/5068
|
||||
<https://github.com/scylladb/scylla/issues/5068>
|
||||
|
||||
* DAX (DynamoDB Accelerator), an in-memory cache for DynamoDB, is not
|
||||
available in for Alternator. Anyway, it should not be necessary - Scylla's
|
||||
internal cache is already rather advanced and there is no need to place
|
||||
another cache in front of the it. We wrote more about this here:
|
||||
https://www.scylladb.com/2017/07/31/database-caches-not-good/
|
||||
<https://www.scylladb.com/2017/07/31/database-caches-not-good/>
|
||||
|
||||
* The DescribeTable is missing information about creation data and size
|
||||
estimates, and also part of the information about indexes enabled on
|
||||
the table.
|
||||
https://github.com/scylladb/scylla/issues/5013
|
||||
https://github.com/scylladb/scylla/issues/5026
|
||||
https://github.com/scylladb/scylla/issues/7550
|
||||
https://github.com/scylladb/scylla/issues/7551
|
||||
<https://github.com/scylladb/scylla/issues/5013>
|
||||
<https://github.com/scylladb/scylla/issues/5026>
|
||||
<https://github.com/scylladb/scylla/issues/7550>
|
||||
<https://github.com/scylladb/scylla/issues/7551 >
|
||||
|
||||
* The recently-added PartiQL syntax (SQL-like SELECT/UPDATE/INSERT/DELETE
|
||||
expressions) and the new operations ExecuteStatement, BatchExecuteStatement
|
||||
and ExecuteTransaction is not yet supported.
|
||||
A user that is interested in an SQL-like syntax can consider using Scylla's
|
||||
CQL protocol instead.
|
||||
https://github.com/scylladb/scylla/issues/8787
|
||||
<https://github.com/scylladb/scylla/issues/8787>
|
||||
|
||||
* As mentioned above, Alternator has its own powerful monitoring framework,
|
||||
which is different from AWS's. In particular, the operations
|
||||
@@ -266,8 +266,8 @@ they should be easy to detect. Here is a list of these unimplemented features:
|
||||
UpdateContributorInsights that configure Amazon's "CloudWatch Contributor
|
||||
Insights" are not yet supported. Scylla has different ways to retrieve the
|
||||
same information, such as which items were accessed most often.
|
||||
https://github.com/scylladb/scylla/issues/8788
|
||||
<https://github.com/scylladb/scylla/issues/8788>
|
||||
|
||||
* Alternator does not support the new DynamoDB feature "export to S3",
|
||||
and its operations DescribeExport, ExportTableToPointInTime, ListExports.
|
||||
https://github.com/scylladb/scylla/issues/8789
|
||||
<https://github.com/scylladb/scylla/issues/8789>
|
||||
|
||||
@@ -1,20 +1,25 @@
|
||||
:term:`Sorted Strings Table (SSTable)<SSTable>` is the persistent file format used by Scylla and Apache Cassandra. SSTable is saved as a persistent, ordered, immutable set of files on disk.
|
||||
:term:`Sorted Strings Table (SSTable)<SSTable>` is the persistent file format used by ScyllaDB and Apache Cassandra. SSTable is saved as a persistent, ordered, immutable set of files on disk.
|
||||
Immutable means SSTables are never modified; they are created by a MemTable flush and are deleted by a compaction.
|
||||
The location of Scylla SSTables is specified in scylla.yaml ``data_file_directories`` parameter (default location: ``/var/lib/scylla/data``).
|
||||
The location of ScyllaDB SSTables is specified in scylla.yaml ``data_file_directories`` parameter (default location: ``/var/lib/scylla/data``).
|
||||
|
||||
SSTable 3.0 (mc format) is more efficient and requires less disk space than the SSTable 2.x. SSTable version support is as follows:
|
||||
SSTable 3.x is more efficient and requires less disk space than the SSTable 2.x.
|
||||
|
||||
SSTable Version Support
|
||||
------------------------
|
||||
|
||||
.. list-table::
|
||||
:widths: 33 33 33
|
||||
:header-rows: 1
|
||||
|
||||
* - SSTable Version
|
||||
- Scylla Enterprise Version
|
||||
- Scylla Open Source Version
|
||||
- ScyllaDB Enterprise Version
|
||||
- ScyllaDB Open Source Version
|
||||
* - 3.x ('me')
|
||||
- 2022.2
|
||||
- 5.1 and above
|
||||
* - 3.x ('md')
|
||||
- 2021.1
|
||||
- 4.3 and above
|
||||
- 4.3, 4.4, 4.5, 4.6, 5.0
|
||||
* - 3.0 ('mc')
|
||||
- 2019.1, 2020.1
|
||||
- 3.x, 4.1, 4.2
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Scylla SSTable - 3.x
|
||||
====================
|
||||
ScyllaDB SSTable - 3.x
|
||||
=======================
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
@@ -12,21 +12,24 @@ Scylla SSTable - 3.x
|
||||
|
||||
.. include:: ../_common/sstable_what_is.rst
|
||||
|
||||
* In Scylla 3.1 and above, mc format is enabled by default.
|
||||
* In ScyllaDB 5.1 and above, the ``me`` format is enabled by default.
|
||||
* In ScyllaDB 4.3 to 5.0, the ``md`` format is enabled by default.
|
||||
* In ScyllaDB 3.1 to 4.2, the ``mc`` format is enabled by default.
|
||||
* In ScyllaDB 3.0, the ``mc`` format is disabled by default. You can enable it by adding the ``enable_sstables_mc_format`` parameter set to ``true`` in the ``scylla.yaml`` file. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
enable_sstables_mc_format: true
|
||||
|
||||
* In Scylla 3.0, mc format is disabled by default and can be enabled by adding the ``enable_sstables_mc_format`` parameter as 'true' in ``scylla.yaml`` file.
|
||||
.. REMOVE IN FUTURE VERSIONS - Remove the note above in version 5.2.
|
||||
|
||||
For example:
|
||||
Additional Information
|
||||
-------------------------
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
enable_sstables_mc_format: true
|
||||
|
||||
|
||||
For more information on Scylla 3.x SSTable formats, see below:
|
||||
For more information on ScyllaDB 3.x SSTable formats, see below:
|
||||
|
||||
* :doc:`SSTable 3.0 Data File Format <sstables-3-data-file-format>`
|
||||
* :doc:`SSTable 3.0 Statistics <sstables-3-statistics>`
|
||||
* :doc:`SSTable 3.0 Summary <sstables-3-summary>`
|
||||
* :doc:`SSTable 3.0 Index <sstables-3-index>`
|
||||
* :doc:`SSTable 3.0 Format in Scylla <sstable-format>`
|
||||
* :doc:`SSTable 3.0 Format in ScyllaDB <sstable-format>`
|
||||
|
||||
@@ -28,8 +28,13 @@ Table of contents mc-1-big-TOC.txt
|
||||
|
||||
This document focuses on the data file format but also refers to other components in parts where information stored in them affects the way we read/write the data file.
|
||||
|
||||
Note that the file on-disk format applies both to the "mc" and "md" SSTable format versions.
|
||||
The "md" format only fixed the semantics of the (min|max)_clustering_key fields in the SSTable Statistics file, which are now valid for describing the accurate range of clustering prefixes present in the SSTable.
|
||||
Note that the file on-disk format applies to all "m*" SSTable format versions ("mc", "md", and "me").
|
||||
|
||||
* The "md" format only fixed the semantics of the ``(min|max)_clustering_key`` fields in the SSTable Statistics file,
|
||||
which are now valid for describing the accurate range of clustering prefixes present in the SSTable.
|
||||
* The "me" format added the ``host_id`` of the host writing the SStable to the SSTable Statistics file.
|
||||
It is used to qualify the commit log replay position that is also stored in the SSTable Statistics file.
|
||||
|
||||
See :doc:`SSTables 3.0 Statistics File Format </architecture/sstable/sstable3/sstables-3-statistics>` for more details.
|
||||
|
||||
Overview
|
||||
|
||||
@@ -175,6 +175,13 @@ Whole entry
|
||||
// It contains only one commit log position interval - [lower bound of commit log, upper bound of commit log].
|
||||
|
||||
array<be32<int32_t>, commit_log_interval> commit_log_intervals;
|
||||
|
||||
// Versions MC and MD of SSTable 3.x format end here.
|
||||
|
||||
// UUID of the host that wrote the SSTable.
|
||||
// Qualifies all commitlog positions in the SSTable Statistics file.
|
||||
|
||||
UUID host_id;
|
||||
}
|
||||
|
||||
using clustering_bound = array<be32<int32_t>, clustering_column>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# ScyllaDB CQL Extensions
|
||||
|
||||
Scylla extends the CQL language to provide a few extra features. This document
|
||||
ScyllaDB extends the CQL language to provide a few extra features. This document
|
||||
lists those extensions.
|
||||
|
||||
## BYPASS CACHE clause
|
||||
@@ -109,7 +109,7 @@ Storage options can be inspected by checking the new system schema table: `syste
|
||||
A special statement is dedicated for pruning ghost rows from materialized views.
|
||||
Ghost row is an inconsistency issue which manifests itself by having rows
|
||||
in a materialized view which do not correspond to any base table rows.
|
||||
Such inconsistencies should be prevented altogether and Scylla is striving to avoid
|
||||
Such inconsistencies should be prevented altogether and ScyllaDB is striving to avoid
|
||||
them, but *if* they happen, this statement can be used to restore a materialized view
|
||||
to a fully consistent state without rebuilding it from scratch.
|
||||
|
||||
@@ -133,21 +133,35 @@ token ranges.
|
||||
|
||||
## Synchronous materialized views
|
||||
|
||||
Materialized view updates can be applied synchronously (with errors propagated
|
||||
back to the user) or asynchronously, in the background. Historically, in order
|
||||
to use synchronous updates, the materialized view had to be local,
|
||||
which could be achieved e.g. by using the same partition key definition
|
||||
as the one present in the base table.
|
||||
Scylla also allows explicitly marking the view as synchronous, which forces
|
||||
all its view updates to be updated synchronously. Such views tend to reduce
|
||||
observed availability of the base table, because a base table write would only
|
||||
succeed if all synchronous view updates also succeed. On the other hand,
|
||||
failed view updates would be detected immediately, and appropriate action
|
||||
can be taken (e.g. pruning the materialized view, as mentioned in the paragraph
|
||||
above).
|
||||
Usually, when a table with materialized views is updated, the update to the
|
||||
views happens _asynchronously_, i.e., in the background. This means that
|
||||
the user cannot know when the view updates have all finished - or even be
|
||||
sure that they succeeded.
|
||||
|
||||
In order to mark a materialized view as synchronous, one can use the following
|
||||
syntax:
|
||||
However, there are circumstances where ScyllaDB does view updates
|
||||
_synchronously_ - i.e., the user's write returns only after the views
|
||||
were updated. This happens when the materialized-view replica is on the
|
||||
same node as the base-table replica. For example, if the base table and
|
||||
the view have the same partition key. Note that only ScyllaDB guarantees
|
||||
synchronous view updates in this case - they are asynchronous in Cassandra.
|
||||
|
||||
ScyllaDB also allows explicitly marking a view as synchronous. When a view
|
||||
is marked synchronous, base-table updates will wait for that view to be
|
||||
updated before returning. A base table may have multiple views marked
|
||||
synchronous, and will wait for all of them. The consistency level of a
|
||||
write applies to synchronous views as well as to the base table: For
|
||||
example, writing with QUORUM consistency level returns only after a
|
||||
quorum of the base-table replicas were updated *and* also a quorum of
|
||||
each synchronous view table was also updated.
|
||||
|
||||
Synchronous views tend to reduce the observed availability of the base table,
|
||||
because a base-table write would only succeed if enough synchronous view
|
||||
updates also succeed. On the other hand, failed view updates would be
|
||||
detected immediately, and appropriate action can be taken, such as retrying
|
||||
the write or pruning the materialized view (as mentioned in the previous
|
||||
section). This can improve the consistency of the base table with its views.
|
||||
|
||||
To create a new materialized view with synchronous updates, use:
|
||||
|
||||
```cql
|
||||
CREATE MATERIALIZED VIEW main.mv
|
||||
@@ -157,12 +171,18 @@ CREATE MATERIALIZED VIEW main.mv
|
||||
WITH synchronous_updates = true;
|
||||
```
|
||||
|
||||
To make an existing materialized view synchronous, use:
|
||||
|
||||
```cql
|
||||
ALTER MATERIALIZED VIEW main.mv WITH synchronous_updates = true;
|
||||
```
|
||||
|
||||
Synchronous updates can also be dynamically turned off by setting
|
||||
the value of `synchronous_updates` to `false`.
|
||||
To return a materialized view to the default behavior (which, as explained
|
||||
above, _usually_ means asynchronous updates), use:
|
||||
|
||||
```cql
|
||||
ALTER MATERIALIZED VIEW main.mv WITH synchronous_updates = false;
|
||||
```
|
||||
|
||||
### Synchronous global secondary indexes
|
||||
|
||||
@@ -261,7 +281,7 @@ that the rate of requests exceeds configured limit, the cluster will start
|
||||
rejecting some of them in order to bring the throughput back to the configured
|
||||
limit. Rejected requests are less costly which can help reduce overload.
|
||||
|
||||
_NOTE_: Due to Scylla's distributed nature, tracking per-partition request rates
|
||||
_NOTE_: Due to ScyllaDB's distributed nature, tracking per-partition request rates
|
||||
is not perfect and the actual rate of accepted requests may be higher up to
|
||||
a factor of keyspace's `RF`. This feature should not be used to enforce precise
|
||||
limits but rather serve as an overload protection feature.
|
||||
|
||||
@@ -863,6 +863,18 @@ Other considerations:
|
||||
- Adding new columns (see ``ALTER TABLE`` below) is a constant time operation. There is thus no need to try to
|
||||
anticipate future usage when creating a table.
|
||||
|
||||
.. _ddl-per-parition-rate-limit:
|
||||
|
||||
Limiting the rate of requests per partition
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can limit the read rates and writes rates into a partition by applying
|
||||
a ScyllaDB CQL extension to the CREATE TABLE or ALTER TABLE statements.
|
||||
See `Per-partition rate limit <https://docs.scylladb.com/stable/cql/cql-extensions.html#per-partition-rate-limit>`_
|
||||
for details.
|
||||
|
||||
.. REMOVE IN FUTURE VERSIONS - Remove the URL above (temporary solution) and replace it with a relative link (once the solution is applied).
|
||||
|
||||
.. _alter-table-statement:
|
||||
|
||||
ALTER TABLE
|
||||
@@ -921,6 +933,7 @@ The ``ALTER TABLE`` statement can:
|
||||
The same note applies to the set of ``compression`` sub-options.
|
||||
- Change or add any of the ``Encryption options`` above.
|
||||
- Change or add any of the :ref:`CDC options <cdc-options>` above.
|
||||
- Change or add per-partition rate limits. See :ref:`Limiting the rate of requests per partition <ddl-per-parition-rate-limit>`.
|
||||
|
||||
.. warning:: Dropping a column assumes that the timestamps used for the value of this column are "real" timestamp in
|
||||
microseconds. Using "real" timestamps in microseconds is the default is and is **strongly** recommended, but as
|
||||
@@ -930,7 +943,6 @@ The ``ALTER TABLE`` statement can:
|
||||
.. warning:: Once a column is dropped, it is allowed to re-add a column with the same name as the dropped one
|
||||
**unless** the type of the dropped column was a (non-frozen) column (due to an internal technical limitation).
|
||||
|
||||
|
||||
.. _drop-table-statement:
|
||||
|
||||
DROP TABLE
|
||||
|
||||
@@ -99,11 +99,12 @@ alternatively, of the wildcard character (``*``) to select all the columns defin
|
||||
Selectors
|
||||
`````````
|
||||
|
||||
A :token:`selector` can be one of:
|
||||
A :token:`selector` can be one of the following:
|
||||
|
||||
- A column name of the table selected to retrieve the values for that column.
|
||||
- A casting, which allows you to convert a nested selector to a (compatible) type.
|
||||
- A function call, where the arguments are selector themselves.
|
||||
- A call to the :ref:`COUNT function <count-function>`, which counts all non-null results.
|
||||
|
||||
Aliases
|
||||
```````
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
.. _cql-functions:
|
||||
|
||||
.. Need some intro for UDF and native functions in general and point those to it.
|
||||
.. _udfs:
|
||||
.. _native-functions:
|
||||
|
||||
Functions
|
||||
@@ -33,13 +32,15 @@ CQL supports two main categories of functions:
|
||||
- The :ref:`aggregate functions <aggregate-functions>`, which are used to aggregate multiple rows of results from a
|
||||
``SELECT`` statement.
|
||||
|
||||
.. In both cases, CQL provides a number of native "hard-coded" functions as well as the ability to create new user-defined
|
||||
.. functions.
|
||||
In both cases, CQL provides a number of native "hard-coded" functions as well as the ability to create new user-defined
|
||||
functions.
|
||||
|
||||
.. .. note:: By default, the use of user-defined functions is disabled by default for security concerns (even when
|
||||
.. enabled, the execution of user-defined functions is sandboxed and a "rogue" function should not be allowed to do
|
||||
.. evil, but no sandbox is perfect so using user-defined functions is opt-in). See the ``enable_user_defined_functions``
|
||||
.. in ``scylla.yaml`` to enable them.
|
||||
.. note:: Although user-defined functions are sandboxed, protecting the system from a "rogue" function, user-defined functions are disabled by default for extra security.
|
||||
See the ``enable_user_defined_functions`` in ``scylla.yaml`` to enable them.
|
||||
|
||||
Additionally, user-defined functions are still experimental and need to be explicitly enabled by adding ``udf`` to the list of
|
||||
``experimental_features`` configuration options in ``scylla.yaml``, or turning on the ``experimental`` flag.
|
||||
See :ref:`Enabling Experimental Features <yaml_enabling_experimental_features>` for details.
|
||||
|
||||
.. A function is identifier by its name:
|
||||
|
||||
@@ -60,11 +61,11 @@ Native functions
|
||||
Cast
|
||||
````
|
||||
|
||||
Supported starting from Scylla version 2.1
|
||||
Supported starting from ScyllaDB version 2.1
|
||||
|
||||
The ``cast`` function can be used to convert one native datatype to another.
|
||||
|
||||
The following table describes the conversions supported by the ``cast`` function. Scylla will silently ignore any cast converting a cast datatype into its own datatype.
|
||||
The following table describes the conversions supported by the ``cast`` function. ScyllaDB will silently ignore any cast converting a cast datatype into its own datatype.
|
||||
|
||||
=============== =======================================================================================================
|
||||
From To
|
||||
@@ -228,6 +229,65 @@ A number of functions are provided to “convert” the native types into binary
|
||||
takes a 64-bit ``blob`` argument and converts it to a ``bigint`` value. For example, ``bigintAsBlob(3)`` is
|
||||
``0x0000000000000003`` and ``blobAsBigint(0x0000000000000003)`` is ``3``.
|
||||
|
||||
.. _udfs:
|
||||
|
||||
User-defined functions :label-caution:`Experimental`
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
User-defined functions (UDFs) execute user-provided code in ScyllaDB. Supported languages are currently Lua and WebAssembly.
|
||||
|
||||
UDFs are part of the ScyllaDB schema and are automatically propagated to all nodes in the cluster.
|
||||
UDFs can be overloaded, so that multiple UDFs with different argument types can have the same function name, for example::
|
||||
|
||||
CREATE FUNCTION sample ( arg int ) ...;
|
||||
CREATE FUNCTION sample ( arg text ) ...;
|
||||
|
||||
When calling a user-defined function, arguments can be literals or terms. Prepared statement placeholders can be used, too.
|
||||
|
||||
CREATE FUNCTION statement
|
||||
`````````````````````````
|
||||
|
||||
Creating a new user-defined function uses the ``CREATE FUNCTION`` statement. For example::
|
||||
|
||||
CREATE OR REPLACE FUNCTION div(dividend double, divisor double)
|
||||
RETURNS NULL ON NULL INPUT
|
||||
RETURNS double
|
||||
LANGUAGE LUA
|
||||
AS 'return dividend/divisor;';
|
||||
|
||||
``CREATE FUNCTION`` with the optional ``OR REPLACE`` keywords creates either a function
|
||||
or replaces an existing one with the same signature. A ``CREATE FUNCTION`` without ``OR REPLACE``
|
||||
fails if a function with the same signature already exists. If the optional ``IF NOT EXISTS``
|
||||
keywords are used, the function will only be created only if another function with the same
|
||||
signature does not exist. ``OR REPLACE`` and ``IF NOT EXISTS`` cannot be used together.
|
||||
|
||||
Behavior for null input values must be defined for each function:
|
||||
|
||||
* ``RETURNS NULL ON NULL INPUT`` declares that the function will always return null (without being executed) if any of the input arguments is null.
|
||||
* ``CALLED ON NULL INPUT`` declares that the function will always be executed.
|
||||
|
||||
Function Signature
|
||||
``````````````````
|
||||
|
||||
Signatures are used to distinguish individual functions. The signature consists of a fully-qualified function name of the <keyspace>.<function_name> and a concatenated list of all the argument types.
|
||||
|
||||
Note that keyspace names, function names and argument types are subject to the default naming conventions and case-sensitivity rules.
|
||||
|
||||
Functions belong to a keyspace; if no keyspace is specified, the current keyspace is used. User-defined functions are not allowed in the system keyspaces.
|
||||
|
||||
DROP FUNCTION statement
|
||||
```````````````````````
|
||||
|
||||
Dropping a function uses the ``DROP FUNCTION`` statement. For example::
|
||||
|
||||
DROP FUNCTION myfunction;
|
||||
DROP FUNCTION mykeyspace.afunction;
|
||||
DROP FUNCTION afunction ( int );
|
||||
DROP FUNCTION afunction ( text );
|
||||
|
||||
You must specify the argument types of the function, the arguments_signature, in the drop command if there are multiple overloaded functions with the same name but different signatures.
|
||||
``DROP FUNCTION`` with the optional ``IF EXISTS`` keywords drops a function if it exists, but does not throw an error if it doesn’t.
|
||||
|
||||
.. _aggregate-functions:
|
||||
|
||||
Aggregate functions
|
||||
@@ -261,6 +321,10 @@ It also can be used to count the non-null value of a given column::
|
||||
|
||||
SELECT COUNT (scores) FROM plays;
|
||||
|
||||
.. note::
|
||||
Counting all rows in a table may be time-consuming and exceed the default timeout. In such a case,
|
||||
see :doc:`Counting all rows in a table is slow </kb/count-all-rows>` for instructions.
|
||||
|
||||
Max and Min
|
||||
```````````
|
||||
|
||||
@@ -286,6 +350,59 @@ instance::
|
||||
|
||||
.. _user-defined-aggregates-functions:
|
||||
|
||||
User-defined aggregates (UDAs) :label-caution:`Experimental`
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
User-defined aggregates allow the creation of custom aggregate functions. User-defined aggregates can be used in SELECT statement.
|
||||
|
||||
Each aggregate requires an initial state of type ``STYPE`` defined with the ``INITCOND`` value (default value: ``null``). The first argument of the state function must have type STYPE. The remaining arguments of the state function must match the types of the user-defined aggregate arguments. The state function is called once for each row, and the value returned by the state function becomes the new state. After all rows are processed, the optional FINALFUNC is executed with the last state value as its argument.
|
||||
|
||||
The ``STYPE`` value is mandatory in order to distinguish possibly overloaded versions of the state and/or final function, since the overload can appear after creation of the aggregate.
|
||||
|
||||
A complete working example for user-defined aggregates (assuming that a keyspace has been selected using the ``USE`` statement)::
|
||||
|
||||
CREATE FUNCTION accumulate_len(acc tuple<bigint,bigint>, a text)
|
||||
RETURNS NULL ON NULL INPUT
|
||||
RETURNS tuple<bigint,bigint>
|
||||
LANGUAGE lua as 'return {acc[1] + 1, acc[2] + #a}';
|
||||
|
||||
CREATE OR REPLACE FUNCTION present(res tuple<bigint,bigint>)
|
||||
RETURNS NULL ON NULL INPUT
|
||||
RETURNS text
|
||||
LANGUAGE lua as
|
||||
'return "The average string length is " .. res[2]/res[1] .. "!"';
|
||||
|
||||
CREATE OR REPLACE AGGREGATE avg_length(text)
|
||||
SFUNC accumulate_len
|
||||
STYPE tuple<bigint,bigint>
|
||||
FINALFUNC present
|
||||
INITCOND (0,0);
|
||||
|
||||
CREATE AGGREGATE statement
|
||||
``````````````````````````
|
||||
|
||||
The ``CREATE AGGREGATE`` command with the optional ``OR REPLACE`` keywords creates either an aggregate or replaces an existing one with the same signature. A ``CREATE AGGREGATE`` without ``OR REPLACE`` fails if an aggregate with the same signature already exists. The ``CREATE AGGREGATE`` command with the optional ``IF NOT EXISTS`` keywords creates an aggregate if it does not already exist. The ``OR REPLACE`` and ``IF NOT EXISTS`` phrases cannot be used together.
|
||||
|
||||
The ``STYPE`` value defines the type of the state value and must be specified. The optional ``INITCOND`` defines the initial state value for the aggregate; the default value is null. A non-null ``INITCOND`` must be specified for state functions that are declared with ``RETURNS NULL ON NULL INPUT``.
|
||||
|
||||
The ``SFUNC`` value references an existing function to use as the state-modifying function. The first argument of the state function must have type ``STYPE``. The remaining arguments of the state function must match the types of the user-defined aggregate arguments. The state function is called once for each row, and the value returned by the state function becomes the new state. State is not updated for state functions declared with ``RETURNS NULL ON NULL INPUT`` and called with null. After all rows are processed, the optional ``FINALFUNC`` is executed with last state value as its argument. It must take only one argument with type ``STYPE``, but the return type of the ``FINALFUNC`` may be a different type. A final function declared with ``RETURNS NULL ON NULL INPUT`` means that the aggregate’s return value will be null, if the last state is null.
|
||||
|
||||
If no ``FINALFUNC`` is defined, the overall return type of the aggregate function is ``STYPE``. If a ``FINALFUNC`` is defined, it is the return type of that function.
|
||||
|
||||
DROP AGGREGATE statement
|
||||
````````````````````````
|
||||
|
||||
Dropping an user-defined aggregate function uses the DROP AGGREGATE statement. For example::
|
||||
|
||||
DROP AGGREGATE myAggregate;
|
||||
DROP AGGREGATE myKeyspace.anAggregate;
|
||||
DROP AGGREGATE someAggregate ( int );
|
||||
DROP AGGREGATE someAggregate ( text );
|
||||
|
||||
The ``DROP AGGREGATE`` statement removes an aggregate created using ``CREATE AGGREGATE``. You must specify the argument types of the aggregate to drop if there are multiple overloaded aggregates with the same name but a different signature.
|
||||
|
||||
The ``DROP AGGREGATE`` command with the optional ``IF EXISTS`` keywords drops an aggregate if it exists, and does nothing if a function with the signature does not exist.
|
||||
|
||||
.. include:: /rst_include/apache-cql-return-index.rst
|
||||
|
||||
.. include:: /rst_include/apache-copyrights.rst
|
||||
.. include:: /rst_include/apache-copyrights.rst
|
||||
@@ -8,47 +8,47 @@ Getting Started
|
||||
install-scylla/index
|
||||
configure
|
||||
requirements
|
||||
Migrate to Scylla </using-scylla/migrate-scylla>
|
||||
Migrate to ScyllaDB </using-scylla/migrate-scylla>
|
||||
Integration Solutions </using-scylla/integrations/index>
|
||||
tutorials
|
||||
|
||||
.. panel-box::
|
||||
:title: Scylla Requirements
|
||||
:title: ScyllaDB Requirements
|
||||
:id: "getting-started"
|
||||
:class: my-panel
|
||||
|
||||
* :doc:`Scylla System Requirements Guide</getting-started/system-requirements/>`
|
||||
* :doc:`ScyllaDB System Requirements Guide</getting-started/system-requirements/>`
|
||||
* :doc:`OS Support by Platform and Version</getting-started/os-support/>`
|
||||
|
||||
.. panel-box::
|
||||
:title: Install and Configure Scylla
|
||||
:title: Install and Configure ScyllaDB
|
||||
:id: "getting-started"
|
||||
:class: my-panel
|
||||
|
||||
* `Install Scylla (Binary Packages, Docker, or EC2) <https://www.scylladb.com/download/>`_ - Links to the ScyllaDB Download Center
|
||||
* `Install ScyllaDB (Binary Packages, Docker, or EC2) <https://www.scylladb.com/download/>`_ - Links to the ScyllaDB Download Center
|
||||
|
||||
* :doc:`Configure Scylla</getting-started/system-configuration/>`
|
||||
* :doc:`Run Scylla in a Shared Environment </getting-started/scylla-in-a-shared-environment>`
|
||||
* :doc:`Create a Scylla Cluster - Single Data Center (DC) </operating-scylla/procedures/cluster-management/create-cluster/>`
|
||||
* :doc:`Create a Scylla Cluster - Multi Data Center (DC) </operating-scylla/procedures/cluster-management/create-cluster-multidc/>`
|
||||
* :doc:`Configure ScyllaDB </getting-started/system-configuration/>`
|
||||
* :doc:`Run ScyllaDB in a Shared Environment </getting-started/scylla-in-a-shared-environment>`
|
||||
* :doc:`Create a ScyllaDB Cluster - Single Data Center (DC) </operating-scylla/procedures/cluster-management/create-cluster/>`
|
||||
* :doc:`Create a ScyllaDB Cluster - Multi Data Center (DC) </operating-scylla/procedures/cluster-management/create-cluster-multidc/>`
|
||||
|
||||
.. panel-box::
|
||||
:title: Develop Applications for Scylla
|
||||
:title: Develop Applications for ScyllaDB
|
||||
:id: "getting-started"
|
||||
:class: my-panel
|
||||
|
||||
* :doc:`Scylla Drivers</using-scylla/drivers/index>`
|
||||
* `Get Started Lesson on Scylla University <https://university.scylladb.com/courses/scylla-essentials-overview/lessons/quick-wins-install-and-run-scylla/>`_
|
||||
* :doc:`ScyllaDB Drivers</using-scylla/drivers/index>`
|
||||
* `Get Started Lesson on ScyllaDB University <https://university.scylladb.com/courses/scylla-essentials-overview/lessons/quick-wins-install-and-run-scylla/>`_
|
||||
* :doc:`CQL Reference </cql/index>`
|
||||
* :doc:`cqlsh - the CQL shell </cql/cqlsh/>`
|
||||
|
||||
.. panel-box::
|
||||
:title: Use Scylla with Third-party Solutions
|
||||
:title: Use ScyllaDB with Third-party Solutions
|
||||
:id: "getting-started"
|
||||
:class: my-panel
|
||||
|
||||
* :doc:`Migrate to Scylla </using-scylla/migrate-scylla>` - How to migrate your current database to Scylla
|
||||
* :doc:`Integrate with Scylla </using-scylla/integrations/index>` - Integration solutions with Scylla
|
||||
* :doc:`Migrate to ScyllaDB </using-scylla/migrate-scylla>` - How to migrate your current database to Scylla
|
||||
* :doc:`Integrate with ScyllaDB </using-scylla/integrations/index>` - Integration solutions with Scylla
|
||||
|
||||
|
||||
.. panel-box::
|
||||
|
||||
@@ -1,81 +1,93 @@
|
||||
OS Support by Platform and Version
|
||||
==================================
|
||||
|
||||
The following matrix shows which Operating Systems, Platforms, and Containers / Instance Engines are supported with which versions of Scylla.
|
||||
The following matrix shows which Operating Systems, Platforms, and Containers / Instance Engines are supported with which versions of ScyllaDB.
|
||||
|
||||
Scylla requires a fix to the XFS append introduced in kernel 3.15 (back-ported to 3.10 in RHEL/CentOS).
|
||||
Scylla will not run with earlier kernel versions. Details in `Scylla issue 885 <https://github.com/scylladb/scylla/issues/885>`_.
|
||||
ScyllaDB requires a fix to the XFS append introduced in kernel 3.15 (back-ported to 3.10 in RHEL/CentOS).
|
||||
ScyllaDB will not run with earlier kernel versions. Details in `ScyllaDB issue 885 <https://github.com/scylladb/scylla/issues/885>`_.
|
||||
|
||||
.. REMOVE IN FUTURE VERSIONS - Remove information about versions from the notes below in version 5.2.
|
||||
|
||||
.. note::
|
||||
|
||||
**Supported Architecture**
|
||||
|
||||
Scylla Open Source supports x86_64 for all versions and aarch64 starting from Scylla 4.6 and nightly build. In particular, aarch64 support includes AWS EC2 Graviton.
|
||||
|
||||
For Scylla Open Source **4.5** and later, the recommended OS and Scylla AMI/IMage OS is Ubuntu 20.04.4 LTS.
|
||||
ScyllaDB Open Source supports x86_64 for all versions and AArch64 starting from ScyllaDB 4.6 and nightly build. In particular, aarch64 support includes AWS EC2 Graviton.
|
||||
|
||||
|
||||
Scylla Open Source
|
||||
-------------------
|
||||
ScyllaDB Open Source
|
||||
----------------------
|
||||
|
||||
.. note:: For Enterprise versions **prior to** 4.6, the recommended OS and Scylla AMI/Image OS is CentOS 7.
|
||||
.. note::
|
||||
|
||||
For Scylla Open Source versions **4.6 and later**, the recommended OS and Scylla AMI/Image OS is Ubuntu 20.04.
|
||||
Recommended OS and ScyllaDB AMI/Image OS for ScyllaDB Open Source:
|
||||
|
||||
- Ubuntu 20.04 for versions 4.6 and later.
|
||||
- CentOS 7 for versions earlier than 4.6.
|
||||
|
||||
|
||||
|
||||
+--------------------------+----------------------------------+-----------------------------+-------------+
|
||||
| Platform | Ubuntu | Debian | Centos/RHEL |
|
||||
+--------------------------+------+------+------+------+------+------+------+-------+-------+------+------+
|
||||
| Scylla Version / Version | 14.04| 16.04| 18.04|20.04 |22.04 | 8 | 9 | 10 | 11 | 7 | 8 |
|
||||
+==========================+======+======+======+======+======+======+======+=======+=======+======+======+
|
||||
| 5.0 | |x| | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |v| | |v| |
|
||||
+--------------------------+------+------+------+------+------+------+------+-------+-------+------+------+
|
||||
| 4.6 | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+--------------------------+------+------+------+------+------+------+------+-------+-------+------+------+
|
||||
| 4.5 | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+--------------------------+------+------+------+------+------+------+------+-------+-------+------+------+
|
||||
| 4.4 | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+--------------------------+------+------+------+------+------+------+------+-------+-------+------+------+
|
||||
| 4.3 | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+--------------------------+------+------+------+------+------+------+------+-------+-------+------+------+
|
||||
| 4.2 | |x| | |v| | |v| | |x| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+--------------------------+------+------+------+------+------+------+------+-------+-------+------+------+
|
||||
| 4.1 | |x| | |v| | |v| | |x| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+--------------------------+------+------+------+------+------+------+------+-------+-------+------+------+
|
||||
| 4.0 | |x| | |v| | |v| | |x| | |x| | |x| | |v| | |x| | |x| | |v| | |x| |
|
||||
+--------------------------+------+------+------+------+------+------+------+-------+-------+------+------+
|
||||
| 3.x | |x| | |v| | |v| | |x| | |x| | |x| | |v| | |x| | |x| | |v| | |x| |
|
||||
+--------------------------+------+------+------+------+------+------+------+-------+-------+------+------+
|
||||
| 2.3 | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |x| | |x| | |v| | |x| |
|
||||
+--------------------------+------+------+------+------+------+------+------+-------+-------+------+------+
|
||||
| 2.2 | |v| | |v| | |x| | |x| | |x| | |v| | |x| | |x| | |x| | |v| | |x| |
|
||||
+--------------------------+------+------+------+------+------+------+------+-------+-------+------+------+
|
||||
+----------------------------+----------------------------------+-----------------------------+---------+-------+
|
||||
| Platform | Ubuntu | Debian | CentOS /| Rocky/|
|
||||
| | | | RHEL | RHEL |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
| ScyllaDB Version / Version | 14.04| 16.04| 18.04|20.04 |22.04 | 8 | 9 | 10 | 11 | 7 | 8 |
|
||||
+============================+======+======+======+======+======+======+======+=======+=======+=========+=======+
|
||||
| 5.1 | |x| | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |v| | |v| |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
| 5.0 | |x| | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |v| | |v| |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
| 4.6 | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
| 4.5 | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
| 4.4 | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
| 4.3 | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
| 4.2 | |x| | |v| | |v| | |x| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
| 4.1 | |x| | |v| | |v| | |x| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
| 4.0 | |x| | |v| | |v| | |x| | |x| | |x| | |v| | |x| | |x| | |v| | |x| |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
| 3.x | |x| | |v| | |v| | |x| | |x| | |x| | |v| | |x| | |x| | |v| | |x| |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
| 2.3 | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |x| | |x| | |v| | |x| |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
| 2.2 | |v| | |v| | |x| | |x| | |x| | |v| | |x| | |x| | |x| | |v| | |x| |
|
||||
+----------------------------+------+------+------+------+------+------+------+-------+-------+---------+-------+
|
||||
|
||||
|
||||
All releases are available as a Docker container, EC2 AMI, and a GCP image (GCP image from version 4.3).
|
||||
|
||||
|
||||
Scylla Enterprise
|
||||
-----------------
|
||||
ScyllaDB Enterprise
|
||||
--------------------
|
||||
|
||||
.. note:: Enterprise versions **prior to** 2021.1, the recommended OS and Scylla AMI/IMage OS is CentOS 7.
|
||||
.. note::
|
||||
Recommended OS and ScyllaDB AMI/Image OS for ScyllaDB Enterprise:
|
||||
|
||||
For Enterprise versions **2021.1 and later**, the recommended OS and Scylla AMI/IMage OS is Ubuntu 20.04.4 LTS.
|
||||
- Ubuntu 20.04 for versions 2021.1 and later.
|
||||
- CentOS 7 for versions earlier than 2021.1.
|
||||
|
||||
For Enterprise versions **2021.1 and later**, the recommended OS and Scylla AMI/Image OS is Ubuntu 20.04.
|
||||
|
||||
+--------------------------+---------------------------+--------------------+------------+
|
||||
| Platform | Ubuntu | Debian | Centos/RHEL|
|
||||
+--------------------------+------+------+------+------+------+------+------+------+-----+
|
||||
| Scylla Version / Version | 14 | 16 | 18 | 20 | 8 | 9 | 10 | 7 | 8 |
|
||||
+==========================+======+======+======+======+======+======+======+======+=====+
|
||||
| 2021.1 | |x| | |v| | |v| | |v| | |x| | |v| | |v| | |v| | |v| |
|
||||
+--------------------------+------+------+------+------+------+------+------+------+-----+
|
||||
| 2020.1 | |x| | |v| | |v| | |x| | |x| | |v| | |v| | |v| | |v| |
|
||||
+--------------------------+------+------+------+------+------+------+------+------+-----+
|
||||
| 2019.1 | |x| | |v| | |v| | |x| | |x| | |v| | |x| | |v| | |x| |
|
||||
+--------------------------+------+------+------+------+------+------+------+------+-----+
|
||||
| 2018.1 | |v| | |v| | |x| | |x| | |v| | |x| | |x| | |v| | |x| |
|
||||
+--------------------------+------+------+------+------+------+------+------+------+-----+
|
||||
+----------------------------+-----------------------------------+---------------------------+--------+-------+
|
||||
| Platform | Ubuntu | Debian | CentOS/| Rocky/|
|
||||
| | | | RHEL | RHEL |
|
||||
+----------------------------+------+------+------+------+-------+------+------+------+------+--------+-------+
|
||||
| ScyllaDB Version / Version | 14.04| 16.04| 18.04| 20.04| 22.04 | 8 | 9 | 10 | 11 | 7 | 8 |
|
||||
+============================+======+======+======+======+=======+======+======+======+======+========+=======+
|
||||
| 2022.2 | |x| | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |v| | |v| |
|
||||
+----------------------------+------+------+------+------+-------+------+------+------+------+--------+-------+
|
||||
| 2022.1 | |x| | |x| | |v| | |v| | |x| | |x| | |x| | |v| | |v| | |v| | |v| |
|
||||
+----------------------------+------+------+------+------+-------+------+------+------+------+--------+-------+
|
||||
| 2021.1 | |x| | |v| | |v| | |v| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+----------------------------+------+------+------+------+-------+------+------+------+------+--------+-------+
|
||||
| 2020.1 | |x| | |v| | |v| | |x| | |x| | |x| | |v| | |v| | |x| | |v| | |v| |
|
||||
+----------------------------+------+------+------+------+-------+------+------+------+------+--------+-------+
|
||||
| 2019.1 | |x| | |v| | |v| | |x| | |x| | |x| | |v| | |x| | |x| | |v| | |x| |
|
||||
+----------------------------+------+------+------+------+-------+------+------+------+------+--------+-------+
|
||||
| 2018.1 | |v| | |v| | |x| | |x| | |v| | |x| | |x| | |x| | |x| | |v| | |x| |
|
||||
+----------------------------+------+------+------+------+-------+------+------+------+------+--------+-------+
|
||||
|
||||
|
||||
All releases are available as a Docker container, EC2 AMI, and a GCP image (GCP image from version 2021.1).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
===================
|
||||
Scylla Requirements
|
||||
===================
|
||||
=====================
|
||||
ScyllaDB Requirements
|
||||
=====================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
@@ -22,9 +22,9 @@ Scylla Requirements
|
||||
</div>
|
||||
<div class="medium-9 columns">
|
||||
|
||||
* :doc:`Scylla System Requirements Guide</getting-started/system-requirements/>`
|
||||
* :doc:`ScyllaDB System Requirements Guide</getting-started/system-requirements/>`
|
||||
* :doc:`OS Support by Platform and Version</getting-started/os-support/>`
|
||||
* :doc:`Running Scylla in a shared environment </getting-started/scylla-in-a-shared-environment>`
|
||||
* :doc:`Running ScyllaDB in a Shared Environment </getting-started/scylla-in-a-shared-environment>`
|
||||
|
||||
.. raw:: html
|
||||
|
||||
|
||||
@@ -25,29 +25,31 @@
|
||||
|
||||
<div class="grid-x grid-margin-x hs">
|
||||
|
||||
.. topic-box::
|
||||
:title: New to ScyllaDB? Start here!
|
||||
:link: https://cloud.docs.scylladb.com/stable/scylladb-basics/
|
||||
:class: large-4
|
||||
:anchor: ScyllaDB Basics
|
||||
|
||||
Learn the essentials of ScyllaDB.
|
||||
|
||||
|
||||
.. topic-box::
|
||||
:title: Let us manage your DB
|
||||
:link: https://cloud.docs.scylladb.com
|
||||
:class: large-4
|
||||
:anchor: Get Started with Scylla Cloud
|
||||
:anchor: ScyllaDB Cloud Documentation
|
||||
|
||||
Take advantage of Scylla Cloud, a fully-managed database-as-a-service.
|
||||
Simplify application development with ScyllaDB Cloud - a fully managed database-as-a-service.
|
||||
|
||||
.. topic-box::
|
||||
:title: Manage your own DB
|
||||
:link: getting-started
|
||||
:class: large-4
|
||||
:anchor: Get Started with Scylla
|
||||
:anchor: ScyllaDB Open Source and Enterprise Documentation
|
||||
|
||||
Provision and manage a Scylla cluster in your environment.
|
||||
Deploy and manage your database in your own environment.
|
||||
|
||||
.. topic-box::
|
||||
:title: Connect your application to Scylla
|
||||
:link: using-scylla/drivers
|
||||
:class: large-4
|
||||
:anchor: Choose a Driver
|
||||
|
||||
Use high performance Scylla drivers to connect your application to a Scylla cluster.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
@@ -57,14 +59,13 @@
|
||||
|
||||
<div class="topics-grid topics-grid--products">
|
||||
|
||||
<h2 class="topics-grid__title">Our Product List</h2>
|
||||
<p class="topics-grid__text">To begin choose a product from the list below</p>
|
||||
<h2 class="topics-grid__title">Our Products</h2>
|
||||
|
||||
<div class="grid-container full">
|
||||
<div class="grid-x grid-margin-x">
|
||||
|
||||
.. topic-box::
|
||||
:title: Scylla Enterprise
|
||||
:title: ScyllaDB Enterprise
|
||||
:link: getting-started
|
||||
:image: /_static/img/mascots/scylla-enterprise.svg
|
||||
:class: topic-box--product,large-3,small-6
|
||||
@@ -72,7 +73,7 @@
|
||||
ScyllaDB’s most stable high-performance enterprise-grade NoSQL database.
|
||||
|
||||
.. topic-box::
|
||||
:title: Scylla Open Source
|
||||
:title: ScyllaDB Open Source
|
||||
:link: getting-started
|
||||
:image: /_static/img/mascots/scylla-opensource.svg
|
||||
:class: topic-box--product,large-3,small-6
|
||||
@@ -80,15 +81,15 @@
|
||||
A high-performance NoSQL database with a close-to-the-hardware, shared-nothing approach.
|
||||
|
||||
.. topic-box::
|
||||
:title: Scylla Cloud
|
||||
:title: ScyllaDB Cloud
|
||||
:link: https://cloud.docs.scylladb.com
|
||||
:image: /_static/img/mascots/scylla-cloud.svg
|
||||
:class: topic-box--product,large-3,small-6
|
||||
|
||||
A fully managed NoSQL database as a service powered by Scylla Enterprise.
|
||||
A fully managed NoSQL database as a service powered by ScyllaDB Enterprise.
|
||||
|
||||
.. topic-box::
|
||||
:title: Scylla Alternator
|
||||
:title: ScyllaDB Alternator
|
||||
:link: https://docs.scylladb.com/stable/alternator/alternator.html
|
||||
:image: /_static/img/mascots/scylla-alternator.svg
|
||||
:class: topic-box--product,large-3,small-6
|
||||
@@ -96,23 +97,23 @@
|
||||
Open source Amazon DynamoDB-compatible API.
|
||||
|
||||
.. topic-box::
|
||||
:title: Scylla Monitoring Stack
|
||||
:title: ScyllaDB Monitoring Stack
|
||||
:link: https://monitoring.docs.scylladb.com
|
||||
:image: /_static/img/mascots/scylla-monitor.svg
|
||||
:class: topic-box--product,large-3,small-6
|
||||
|
||||
Complete open source monitoring solution for your Scylla clusters.
|
||||
Complete open source monitoring solution for your ScyllaDB clusters.
|
||||
|
||||
.. topic-box::
|
||||
:title: Scylla Manager
|
||||
:title: ScyllaDB Manager
|
||||
:link: https://manager.docs.scylladb.com
|
||||
:image: /_static/img/mascots/scylla-manager.svg
|
||||
:class: topic-box--product,large-3,small-6
|
||||
|
||||
Hassle-free Scylla NoSQL database management for scale-out clusters.
|
||||
Hassle-free ScyllaDB NoSQL database management for scale-out clusters.
|
||||
|
||||
.. topic-box::
|
||||
:title: Scylla Drivers
|
||||
:title: ScyllaDB Drivers
|
||||
:link: https://docs.scylladb.com/stable/using-scylla/drivers/
|
||||
:image: /_static/img/mascots/scylla-drivers.svg
|
||||
:class: topic-box--product,large-3,small-6
|
||||
@@ -120,12 +121,12 @@
|
||||
Shard-aware drivers for superior performance.
|
||||
|
||||
.. topic-box::
|
||||
:title: Scylla Operator
|
||||
:title: ScyllaDB Operator
|
||||
:link: https://operator.docs.scylladb.com
|
||||
:image: /_static/img/mascots/scylla-enterprise.svg
|
||||
:class: topic-box--product,large-3,small-6
|
||||
|
||||
Easily run and manage your Scylla Cluster on Kubernetes.
|
||||
Easily run and manage your ScyllaDB cluster on Kubernetes.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
@@ -135,19 +136,19 @@
|
||||
|
||||
<div class="topics-grid">
|
||||
|
||||
<h2 class="topics-grid__title">Learn More About Scylla</h2>
|
||||
<h2 class="topics-grid__title">Learn More About ScyllaDB</h2>
|
||||
<p class="topics-grid__text"></p>
|
||||
<div class="grid-container full">
|
||||
<div class="grid-x grid-margin-x">
|
||||
|
||||
.. topic-box::
|
||||
:title: Attend Scylla University
|
||||
:title: Attend ScyllaDB University
|
||||
:link: https://university.scylladb.com/
|
||||
:image: /_static/img/mascots/scylla-university.png
|
||||
:class: large-6,small-12
|
||||
:anchor: Find a Class
|
||||
|
||||
| Register to take a *free* class at Scylla University.
|
||||
| Register to take a *free* class at ScyllaDB University.
|
||||
| There are several learning paths to choose from.
|
||||
|
||||
.. topic-box::
|
||||
@@ -178,9 +179,9 @@
|
||||
architecture/index
|
||||
troubleshooting/index
|
||||
kb/index
|
||||
Scylla University <https://university.scylladb.com/>
|
||||
ScyllaDB University <https://university.scylladb.com/>
|
||||
faq
|
||||
Contribute to Scylla <contribute>
|
||||
Contribute to ScyllaDB <contribute>
|
||||
glossary
|
||||
alternator/alternator
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Counting all rows in a table is slow
|
||||
====================================
|
||||
|
||||
**Audience: Scylla users**
|
||||
**Audience: ScyllaDB users**
|
||||
|
||||
Trying to count all rows in a table using
|
||||
|
||||
@@ -10,14 +10,21 @@ Trying to count all rows in a table using
|
||||
|
||||
SELECT COUNT(1) FROM ks.table;
|
||||
|
||||
often fails with **ReadTimeout** error.
|
||||
may fail with the **ReadTimeout** error.
|
||||
|
||||
COUNT() is running a full-scan query on all nodes, which might take a long time to finish. Often the time is greater than Scylla query timeout.
|
||||
One way to bypass this in Scylla 4.4 or later is increasing the timeout for this query using the :ref:`USING TIMEOUT <using-timeout>` directive, for example:
|
||||
COUNT() runs a full-scan query on all nodes, which might take a long time to finish. As a result, the count time may be greater than the ScyllaDB query timeout.
|
||||
One way to prevent that issue in Scylla 4.4 or later is to increase the timeout for the query using the :ref:`USING TIMEOUT <using-timeout>` directive, for example:
|
||||
|
||||
|
||||
.. code-block:: cql
|
||||
|
||||
SELECT COUNT(1) FROM ks.table USING TIMEOUT 120s;
|
||||
|
||||
You can also get an *estimation* of the number **of partitions** (not rows) with :doc:`nodetool tablestats </operating-scylla/nodetool-commands/tablestats>`
|
||||
You can also get an *estimation* of the number **of partitions** (not rows) with :doc:`nodetool tablestats </operating-scylla/nodetool-commands/tablestats>`.
|
||||
|
||||
.. note::
|
||||
ScyllaDB 5.1 includes improvements to speed up the execution of SELECT COUNT(*) queries.
|
||||
To increase the count speed, we recommend upgrading to ScyllaDB 5.1 or later.
|
||||
|
||||
|
||||
.. REMOVE IN FUTURE VERSIONS - Remove the note above in version 5.1.
|
||||
|
||||
@@ -55,6 +55,7 @@ Knowledge Base
|
||||
* :doc:`Map CPUs to Scylla Shards </kb/map-cpu>` - Mapping between CPUs and Scylla shards
|
||||
* :doc:`Recreate RAID devices </kb/raid-device>` - How to recreate your RAID devices without running scylla-setup
|
||||
* :doc:`Configure Scylla Networking with Multiple NIC/IP Combinations </kb/yaml-address>` - examples for setting the different IP addresses in scylla.yaml
|
||||
* :doc:`Updating the Mode in perftune.yaml After a ScyllaDB Upgrade </kb/perftune-modes-sync>`
|
||||
* :doc:`Kafka Sink Connector Quickstart </using-scylla/integrations/kafka-connector>`
|
||||
* :doc:`Kafka Sink Connector Configuration </using-scylla/integrations/sink-config>`
|
||||
|
||||
|
||||
48
docs/kb/perftune-modes-sync.rst
Normal file
48
docs/kb/perftune-modes-sync.rst
Normal file
@@ -0,0 +1,48 @@
|
||||
==============================================================
|
||||
Updating the Mode in perftune.yaml After a ScyllaDB Upgrade
|
||||
==============================================================
|
||||
|
||||
In version 2022.1, we improved ScyllaDB's performance by `removing the rx_queues_count from the mode
|
||||
condition <https://github.com/scylladb/seastar/pull/949>`_. As a result, ScyllaDB operates in
|
||||
the ``sq_split`` mode instead of the ``mq`` mode (see :doc:`Seastar Perftune </operating-scylla/admin-tools/perftune>` for information about the modes).
|
||||
If you upgrade from an earlier version of ScyllaDB, your cluster's existing nodes may use the ``mq`` mode,
|
||||
while new nodes will use the ``sq_split`` mode. As using different modes across one cluster is not recommended,
|
||||
you should change the configuration to ensure that the ``sq_split`` mode is used on all nodes.
|
||||
|
||||
This section describes how to update the `perftune.yaml` file to configure the ``sq_split`` mode on all nodes.
|
||||
|
||||
Procedure
|
||||
------------
|
||||
The examples below assume that you are using the default locations for storing data and the `scylla.yaml` file,
|
||||
and that your NIC is ``eth5``.
|
||||
|
||||
#. Backup your old configuration.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo mv /etc/scylla.d/cpuset.conf /etc/scylla.d/cpuset.conf.old
|
||||
sudo mv /etc/scylla.d/perftune.yaml /etc/scylla.d/perftune.yaml.old
|
||||
|
||||
#. Create a new configuration.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo scylla_sysconfig_setup --nic eth5 --homedir /var/lib/scylla --confdir /etc/scylla
|
||||
|
||||
A new ``/etc/scylla.d/cpuset.conf`` will be generated on the output.
|
||||
|
||||
#. Compare the contents of the newly generated ``/etc/scylla.d/cpuset.conf`` with ``/etc/scylla.d/cpuset.conf.old`` you created in step 1.
|
||||
|
||||
- If they are exactly the same, rename ``/etc/scylla.d/perftune.yaml.old`` you created in step 1 back to ``/etc/scylla.d/perftune.yaml`` and continue to the next node.
|
||||
- If they are different, move on to the next steps.
|
||||
|
||||
#. Restart the ``scylla-server`` service.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
nodetool drain
|
||||
sudo systemctl restart scylla-server
|
||||
|
||||
#. Wait for the service to become up and running (similarly to how it is done during a :doc:`rolling restart </operating-scylla/procedures/config-change/rolling-restart>`). It may take a considerable amount of time before the node is in the UN state due to resharding.
|
||||
|
||||
#. Continue to the next node.
|
||||
@@ -42,7 +42,7 @@ Steps:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
nodetool compact <keyspace>.<mytable>;
|
||||
nodetool compact <keyspace> <mytable>;
|
||||
|
||||
5. Alter the table and change the grace period back to the original ``gc_grace_seconds`` value.
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* :doc:`REST - Scylla REST/HTTP Admin API</operating-scylla/rest>`.
|
||||
* :doc:`Tracing </using-scylla/tracing>` - a ScyllaDB tool for debugging and analyzing internal flows in the server.
|
||||
* :doc:`SSTableloader </operating-scylla/admin-tools/sstableloader>` - Bulk load the sstables found in the directory to a Scylla cluster
|
||||
* :doc:`scylla-sstable </operating-scylla/admin-tools/scylla-sstable>` - Validates and dumps the content of SStables, generates a histogram, dumps the content of the SStable index.
|
||||
* :doc:`scylla-types </operating-scylla/admin-tools/scylla-types/>` - Examines raw values obtained from SStables, logs, coredumps, etc.
|
||||
* :doc:`Scylla SStable </operating-scylla/admin-tools/scylla-sstable>` - Validates and dumps the content of SStables, generates a histogram, dumps the content of the SStable index.
|
||||
* :doc:`Scylla Types </operating-scylla/admin-tools/scylla-types/>` - Examines raw values obtained from SStables, logs, coredumps, etc.
|
||||
* :doc:`cassandra-stress </operating-scylla/admin-tools/cassandra-stress/>` A tool for benchmarking and load testing a Scylla and Cassandra clusters.
|
||||
* :doc:`SSTabledump - Scylla 3.0, Scylla Enterprise 2019.1 and newer versions </operating-scylla/admin-tools/sstabledump>`
|
||||
* :doc:`SSTable2JSON - Scylla 2.3 and older </operating-scylla/admin-tools/sstable2json>`
|
||||
|
||||
@@ -9,8 +9,8 @@ Admin Tools
|
||||
CQLSh </cql/cqlsh>
|
||||
REST </operating-scylla/rest>
|
||||
Tracing </using-scylla/tracing>
|
||||
scylla-sstable
|
||||
scylla-types </operating-scylla/admin-tools/scylla-types/>
|
||||
Scylla SStable </operating-scylla/admin-tools/scylla-sstable/>
|
||||
Scylla Types </operating-scylla/admin-tools/scylla-types/>
|
||||
sstableloader
|
||||
cassandra-stress </operating-scylla/admin-tools/cassandra-stress/>
|
||||
sstabledump
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
scylla-sstable
|
||||
Scylla SStable
|
||||
==============
|
||||
|
||||
.. versionadded:: 5.0
|
||||
@@ -9,7 +9,17 @@ Introduction
|
||||
This tool allows you to examine the content of SStables by performing operations such as dumping the content of SStables,
|
||||
generating a histogram, validating the content of SStables, and more. See `Supported Operations`_ for the list of available operations.
|
||||
|
||||
Run ``scylla-sstable --help`` for additional information about the tool and the operations.
|
||||
Run ``scylla sstable --help`` for additional information about the tool and the operations.
|
||||
|
||||
This tool is similar to SStableDump_, with notable differences:
|
||||
|
||||
* Built on the ScyllaDB C++ codebase, it supports all SStable formats and components that ScyllaDB supports.
|
||||
* Expanded scope: this tool supports much more than dumping SStable data components (see `Supported Operations`_).
|
||||
* More flexible on how schema is obtained and where SStables are located: SStableDump_ only supports dumping SStables located in their native data directory. To dump an SStable, one has to clone the entire ScyllaDB data directory tree, including system table directories and even config files. ``scylla sstable`` can dump sstables from any path with multiple choices on how to obtain the schema, see Schema_.
|
||||
|
||||
Currently, SStableDump_ works better on production systems as it automatically loads the schema from the system tables, unlike ``scylla sstable``, which has to be provided with the schema explicitly. On the other hand ``scylla sstable`` works better for off-line investigations, as it can be used with as little as just a schema definition file and a single sstable. In the future we plan on closing this gap -- adding support for automatic schema-loading for ``scylla sstable`` too -- and completely supplant SStableDump_ with ``scylla sstable``.
|
||||
|
||||
.. _SStableDump: /operating-scylla/admin-tools/sstabledump
|
||||
|
||||
Usage
|
||||
------
|
||||
@@ -21,11 +31,82 @@ The command syntax is as follows:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
scylla-sstable <operation> <path to SStable>
|
||||
scylla sstable <operation> <path to SStable>
|
||||
|
||||
|
||||
You can specify more than one SStable.
|
||||
|
||||
Schema
|
||||
^^^^^^
|
||||
All operations need a schema to interpret the SStables with.
|
||||
Currently, there are two ways to obtain the schema:
|
||||
|
||||
* ``--schema-file FILENAME`` - Read the schema definition from a file.
|
||||
* ``--system-schema KEYSPACE.TABLE`` - Use the known definition of built-in tables (only works for system tables).
|
||||
|
||||
By default, the tool uses the first method: ``--schema-file schema.cql``; i.e. it assumes there is a schema file named ``schema.cql`` in the working directory.
|
||||
If this fails, it will exit with an error.
|
||||
|
||||
The schema file should contain all definitions needed to interpret data belonging to the table.
|
||||
|
||||
Example ``schema.cql``:
|
||||
|
||||
.. code-block:: cql
|
||||
|
||||
CREATE KEYSPACE ks WITH replication = {'class': 'NetworkTopologyStrategy', 'mydc1': 1, 'mydc2': 4};
|
||||
|
||||
CREATE TYPE ks.mytype (
|
||||
f1 int,
|
||||
f2 text
|
||||
);
|
||||
|
||||
CREATE TABLE ks.cf (
|
||||
pk int,
|
||||
ck text,
|
||||
v1 int,
|
||||
v2 mytype,
|
||||
PRIMARY KEY (pk, ck)
|
||||
);
|
||||
|
||||
Note:
|
||||
|
||||
* In addition to the table itself, the definition also has to includes any user defined types the table uses.
|
||||
* The keyspace definition is optional, if missing one will be auto-generated.
|
||||
* The schema file doesn't have to be called ``schema.cql``, this is just the default name. Any file name is supported (with any extension).
|
||||
|
||||
Dropped columns
|
||||
***************
|
||||
|
||||
The examined sstable might have columns which were dropped from the schema definition. In this case providing the up-do-date schema will not be enough, the tool will fail when attempting to process a cell for the dropped column.
|
||||
Dropped columns can be provided to the tool in the form of insert statements into the ``system_schema.dropped_columns`` system table, in the schema definition file. Example:
|
||||
|
||||
.. code-block:: cql
|
||||
|
||||
INSERT INTO system_schema.dropped_columns (
|
||||
keyspace_name,
|
||||
table_name,
|
||||
column_name,
|
||||
dropped_time,
|
||||
type
|
||||
) VALUES (
|
||||
'ks',
|
||||
'cf',
|
||||
'v1',
|
||||
1631011979170675,
|
||||
'int'
|
||||
);
|
||||
|
||||
CREATE TABLE ks.cf (pk int PRIMARY KEY, v2 int);
|
||||
|
||||
System tables
|
||||
*************
|
||||
|
||||
If the examined table is a system table -- it belongs to one of the system keyspaces (``system``, ``system_schema``, ``system_distributed`` or ``system_distributed_everywhere``) -- you can just tell the tool to use the known built-in definition of said table. This is possible with the ``--system-schema`` flag. Example:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
scylla sstable dump-data --system-schema system.local ./path/to/md-123456-big-Data.db
|
||||
|
||||
Supported Operations
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
The ``dump-*`` operations output JSON. For ``dump-data``, you can specify another output format.
|
||||
@@ -56,17 +137,17 @@ Dumping the content of the SStable:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
scylla-sstable dump-data /path/to/md-123456-big-Data.db
|
||||
scylla sstable dump-data /path/to/md-123456-big-Data.db
|
||||
|
||||
Dumping the content of two SStables as a unified stream:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
scylla-sstable dump-data --merge /path/to/md-123456-big-Data.db /path/to/md-123457-big-Data.db
|
||||
scylla sstable dump-data --merge /path/to/md-123456-big-Data.db /path/to/md-123457-big-Data.db
|
||||
|
||||
|
||||
Validating the specified SStables:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
scylla-sstable validate /path/to/md-123456-big-Data.db /path/to/md-123457-big-Data.db
|
||||
scylla sstable validate /path/to/md-123456-big-Data.db /path/to/md-123457-big-Data.db
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
scylla-types
|
||||
Scylla Types
|
||||
==============
|
||||
|
||||
.. versionadded:: 5.0
|
||||
@@ -26,7 +26,7 @@ The command syntax is as follows:
|
||||
* Provide the values in the hex form without a leading 0x prefix.
|
||||
* You must specify the type of the provided values. See :ref:`Specifying the Value Type <scylla-types-type>`.
|
||||
* The number of provided values depends on the operation. See :ref:`Supported Operations <scylla-types-operations>` for details.
|
||||
* The scylla-types operations come with additional options. See :ref:`Additional Options <scylla-types-options>` for the list of options.
|
||||
* The ``scylla types`` operations come with additional options. See :ref:`Additional Options <scylla-types-options>` for the list of options.
|
||||
|
||||
.. _scylla-types-type:
|
||||
|
||||
|
||||
@@ -4,8 +4,10 @@ SSTabledump
|
||||
This tool allows you to converts SSTable into a JSON format file.
|
||||
SSTabledump supported when using Scylla 3.0, Scylla Enterprise 2019.1, and newer versions.
|
||||
In older versions, the tool is named SSTable2json_.
|
||||
If you need more flexibility or want to dump more than just the data-component, see scylla-sstable_.
|
||||
|
||||
.. _SSTable2json: /operating-scylla/admin-tools/sstable2json
|
||||
.. _scylla-sstable: /operating-scylla/admin-tools/scylla-sstable
|
||||
|
||||
Use the full path to the data file when executing the command.
|
||||
|
||||
|
||||
@@ -9,12 +9,9 @@ Scylla for Administrators
|
||||
Procedures <procedures/index>
|
||||
security/index
|
||||
admin-tools/index
|
||||
manager/index
|
||||
ScyllaDB Monitoring Stack <https://monitoring.docs.scylladb.com/>
|
||||
ScyllaDB Operator <https://operator.docs.scylladb.com/>
|
||||
ScyllaDB Manager <https://manager.docs.scylladb.com/>
|
||||
Scylla Monitoring Stack <monitoring/index>
|
||||
Scylla Operator <scylla-operator/index>
|
||||
Upgrade Procedures </upgrade/index>
|
||||
System Configuration <system-configuration/index>
|
||||
benchmarking-scylla
|
||||
@@ -36,15 +33,9 @@ Scylla for Administrators
|
||||
:class: my-panel
|
||||
|
||||
* :doc:`Scylla Tools </operating-scylla/admin-tools/index>` - Tools for Administrating and integrating with Scylla
|
||||
<<<<<<< HEAD
|
||||
* :doc:`Scylla Manager </operating-scylla/manager/index>` - Tool for cluster administration and automation
|
||||
* `ScyllaDB Monitoring Stack <https://monitoring.docs.scylladb.com/stable/>`_ - Tool for cluster monitoring and alerting
|
||||
* `ScyllaDB Operator <https://operator.docs.scylladb.com>`_ - Tool to run Scylla on Kubernetes
|
||||
=======
|
||||
* `ScyllaDB Manager <https://manager.docs.scylladb.com/>`_ - Tool for cluster administration and automation
|
||||
* :doc:`Scylla Monitoring Stack </operating-scylla/monitoring/index>` - Tool for cluster monitoring and alerting
|
||||
* :doc:`Scylla Operator </operating-scylla/scylla-operator/index>` - Tool to run Scylla on Kubernetes
|
||||
>>>>>>> 40050f951 (doc: add the link to manager.docs.scylladb.com to the toctree)
|
||||
* :doc:`Scylla Logs </getting-started/logging/>`
|
||||
|
||||
.. panel-box::
|
||||
|
||||
@@ -7,9 +7,7 @@ This document is a step-by-step procedure for upgrading from ScyllaDB Open Sourc
|
||||
|
||||
Applicable Versions
|
||||
===================
|
||||
This guide covers upgrading ScyllaDB from version 5.0.x to ScyllaDB Enterprise version 2022.1.y on the following platform:
|
||||
|
||||
* |OS|
|
||||
This guide covers upgrading ScyllaDB from version 5.0.x to ScyllaDB Enterprise version 2022.1.y on |OS|. See :doc:`OS Support by Platform and Version </getting-started/os-support>` for information about supported |OS| versions.
|
||||
|
||||
Upgrade Procedure
|
||||
=================
|
||||
@@ -30,7 +28,7 @@ Apply the following procedure **serially** on each node. Do not move to the next
|
||||
**During** the rolling upgrade, it is highly recommended:
|
||||
|
||||
* Not to use new 2022.1 features.
|
||||
* Not to run administration functions, like repairs, refresh, rebuild or add or remove nodes. See :doc:`here </operating-scylla/manager/2.1/sctool>` for suspending Scylla Manager's scheduled or running repairs.
|
||||
* Not to run administration functions, like repairs, refresh, rebuild or add or remove nodes. See `sctool <https://manager.docs.scylladb.com/stable/sctool/>`_ for suspending Scylla Manager's scheduled or running repairs.
|
||||
* Not to apply schema changes.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
======================================================================
|
||||
Upgrade Guide - |SCYLLA_NAME| |SRC_VERSION| to |NEW_VERSION| for |OS|
|
||||
======================================================================
|
||||
|
||||
This document is a step-by-step procedure for upgrading from |SCYLLA_NAME| |FROM| to |SCYLLA_NAME| |TO|, and rollback to 2021.1 if required.
|
||||
|
||||
Applicable versions
|
||||
===================
|
||||
This guide covers upgrading |SCYLLA_NAME| from version |FROM| to version |TO| on |OS|. See :doc:`OS Support by Platform and Version </getting-started/os-support>` for information about supported versions.
|
||||
|
||||
|
||||
Upgrade Procedure
|
||||
=================
|
||||
.. include:: /upgrade/upgrade-enterprise/_common/enterprise_2022.1_warnings.rst
|
||||
|
||||
A ScyllaDB Enterprise upgrade is a rolling procedure which does **not** require a full cluster shutdown.
|
||||
For each of the nodes in the cluster, you will:
|
||||
|
||||
* Drain the node and backup the data
|
||||
* Check your current release
|
||||
* Backup the configuration file
|
||||
* Stop ScyllaDB
|
||||
* Download and install the new ScyllaDB packages
|
||||
* Start ScyllaDB
|
||||
* Validate that the upgrade was successful
|
||||
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating that the node that you upgraded is up and running the new version.
|
||||
|
||||
**During** the rolling upgrade, it is highly recommended:
|
||||
|
||||
* Not to use new 2022.x.z features.
|
||||
* Not to run administration functions, like repairs, refresh, rebuild or add or remove nodes.
|
||||
* Not to apply schema changes.
|
||||
|
||||
Upgrade Steps
|
||||
=============
|
||||
|
||||
Drain the node and backup the data
|
||||
------------------------------------
|
||||
Before any major procedure, like an upgrade, it is recommended to backup all the data to an external device. In ScyllaDB, backup is done using the ``nodetool snapshot`` command. For **each** node in the cluster, run the following command:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
nodetool drain
|
||||
nodetool snapshot
|
||||
|
||||
Take note of the directory name that nodetool gives you, and copy all the directories having this name under ``/var/lib/scylla`` to a backup device.
|
||||
|
||||
When the upgrade is completed on all nodes, the snapshot should be removed with the ``nodetool clearsnapshot -t <snapshot>`` command, or you risk running out of space.
|
||||
|
||||
Backup the configuration file
|
||||
-------------------------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo cp -a /etc/scylla/scylla.yaml /etc/scylla/scylla.yaml.backup-2022.x.z
|
||||
|
||||
Backup more config files.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
for conf in $(cat /var/lib/dpkg/info/scylla-*server.conffiles /var/lib/dpkg/info/scylla-*conf.conffiles /var/lib/dpkg/info/scylla-*jmx.conffiles | grep -v init ); do sudo cp -v $conf $conf.backup-2.1; done
|
||||
|
||||
Gracefully stop the node
|
||||
------------------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service scylla-enterprise-server stop
|
||||
|
||||
Download and install the new release
|
||||
------------------------------------
|
||||
Before upgrading, check what version you are running now using ``dpkg -s scylla-enterprise-server``. You should use the same version in case you want to |ROLLBACK|_ the upgrade. If you are not running a 2022.x.y version, stop right here! This guide only covers 2022.x.y to 2022.x.z upgrades.
|
||||
@@ -0,0 +1,95 @@
|
||||
**To upgrade ScyllaDB:**
|
||||
|
||||
#. Update the |APT|_ to **2022.x**.
|
||||
#. Install:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get clean all
|
||||
sudo apt-get update
|
||||
sudo apt-get dist-upgrade scylla-enterprise
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
Start the node
|
||||
--------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service scylla-enterprise-server start
|
||||
|
||||
Validate
|
||||
--------
|
||||
#. Check cluster status with ``nodetool status`` and make sure **all** nodes, including the one you just upgraded, are in UN status.
|
||||
#. Use ``curl -X GET "http://localhost:10000/storage_service/scylla_release_version"`` to check the ScyllaDB version.
|
||||
#. Check scylla-enterprise-server log (by ``journalctl _COMM=scylla``) and ``/var/log/syslog`` to validate there are no errors.
|
||||
#. Check again after 2 minutes to validate no new issues are introduced.
|
||||
|
||||
Once you are sure the node upgrade is successful, move to the next node in the cluster.
|
||||
|
||||
Rollback Procedure
|
||||
==================
|
||||
|
||||
.. include:: /upgrade/_common/warning_rollback.rst
|
||||
|
||||
The following procedure describes a rollback from ScyllaDB Enterprise release 2022.x.z to 2022.x.y. Apply this procedure if an upgrade from 2022.x.y to 2022.x.z failed before completing on all nodes. Use this procedure only for nodes you upgraded to 2022.x.z.
|
||||
|
||||
ScyllaDB rollback is a rolling procedure which does **not** require a full cluster shutdown.
|
||||
For each of the nodes rollback to 2022.x.y, you will:
|
||||
|
||||
* Gracefully shutdown ScyllaDB
|
||||
* Downgrade to the previous release
|
||||
* Restore the configuration file
|
||||
* Restart ScyllaDB
|
||||
* Validate the rollback success
|
||||
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating that the node is up and running the new version.
|
||||
|
||||
Rollback Steps
|
||||
==============
|
||||
|
||||
Gracefully shutdown ScyllaDB
|
||||
-----------------------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
nodetool drain
|
||||
sudo service scylla-enterprise-server stop
|
||||
|
||||
Downgrade to the previous release
|
||||
----------------------------------
|
||||
|
||||
Install:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get install scylla-enterprise=2022.x.y\* scylla-enterprise-server=2022.x.y\* scylla-enterprise-jmx=2022.x.y\* scylla-enterprise-tools=2022.x.y\* scylla-enterprise-tools-core=2022.x.y\* scylla-enterprise-kernel-conf=2022.x.y\* scylla-enterprise-conf=2022.x.y\* scylla-enterprise-python3=2022.x.y\*
|
||||
sudo apt-get install scylla-enterprise-machine-image=2022.x.y\* # only execute on AMI instance
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
Restore the configuration file
|
||||
------------------------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo rm -rf /etc/scylla/scylla.yaml
|
||||
sudo cp -a /etc/scylla/scylla.yaml.backup-2022.x.z /etc/scylla/scylla.yaml
|
||||
|
||||
Restore more config files.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
for conf in $(cat /var/lib/dpkg/info/scylla-*server.conffiles /var/lib/dpkg/info/scylla-*conf.conffiles /var/lib/dpkg/info/scylla-*jmx.conffiles | grep -v init ); do sudo cp -v $conf.backup-2.1 $conf; done
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
Start the node
|
||||
--------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service scylla-enterprise-server start
|
||||
|
||||
Validate
|
||||
--------
|
||||
Check the upgrade instruction above for validation. Once you are sure the node rollback is successful, move to the next node in the cluster.
|
||||
@@ -0,0 +1,2 @@
|
||||
.. include:: /upgrade/_common/upgrade-guide-v2022-patch-ubuntu-and-debian-p1.rst
|
||||
.. include:: /upgrade/_common/upgrade-guide-v2022-patch-ubuntu-and-debian-p2.rst
|
||||
@@ -0,0 +1,79 @@
|
||||
=============================================================================
|
||||
Upgrade Guide - |SCYLLA_NAME| |SRC_VERSION| to |NEW_VERSION| for |OS|
|
||||
=============================================================================
|
||||
|
||||
This document is a step-by-step procedure for upgrading from ScyllaDB Enterprise 2021.1 to ScyllaDB Enterprise 2022.1, and rollback to 2021.1 if required.
|
||||
|
||||
|
||||
Applicable Versions
|
||||
===================
|
||||
This guide covers upgrading ScyllaDB Enterprise from version 2021.1.x to ScyllaDB Enterprise version 2022.1.y on |OS|. See :doc:`OS Support by Platform and Version </getting-started/os-support>` for information about supported versions.
|
||||
|
||||
Upgrade Procedure
|
||||
=================
|
||||
.. include:: /upgrade/upgrade-enterprise/_common/enterprise_2022.1_warnings.rst
|
||||
|
||||
A ScyllaDB upgrade is a rolling procedure that does **not** require a full cluster shutdown.
|
||||
For each of the nodes in the cluster, you will:
|
||||
|
||||
* Check the cluster schema
|
||||
* Drain the node and backup the data
|
||||
* Backup the configuration file
|
||||
* Stop ScyllaDB
|
||||
* Download and install the new ScyllaDB packages
|
||||
* Start ScyllaDB
|
||||
* Validate that the upgrade was successful
|
||||
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating the node that you upgraded is up and running the new version.
|
||||
|
||||
**During** the rolling upgrade, it is highly recommended:
|
||||
|
||||
* Not to use new 2022.1 features.
|
||||
* Not to run administration functions, like repairs, refresh, rebuild, or add or remove nodes. See `sctool <https://manager.docs.scylladb.com/stable/sctool/index.html>`_ for suspending ScyllaDB Manager's scheduled or running repairs.
|
||||
* Not to apply schema changes.
|
||||
|
||||
.. include:: /upgrade/_common/upgrade_to_2022_warning.rst
|
||||
|
||||
Upgrade Steps
|
||||
=============
|
||||
Check the cluster schema
|
||||
-------------------------
|
||||
Make sure that all nodes have the schema synched before the upgrade. The upgrade will fail if there is a schema disagreement between nodes.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
nodetool describecluster
|
||||
|
||||
Drain the nodes and backup the data
|
||||
-------------------------------------
|
||||
Before any major procedure, like an upgrade, it is recommended to backup all the data to an external device. In ScyllaDB, backup is done using the ``nodetool snapshot`` command. For **each** node in the cluster, run the following command:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
nodetool drain
|
||||
nodetool snapshot
|
||||
|
||||
Take note of the directory name that nodetool gives you, and copy all the directories having this name under ``/var/lib/scylla`` to a backup device.
|
||||
|
||||
When the upgrade is completed on all nodes, the snapshot should be removed with the ``nodetool clearsnapshot -t <snapshot>`` command to prevent running out of space.
|
||||
|
||||
Backup the configuration file
|
||||
------------------------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo cp -a /etc/scylla/scylla.yaml /etc/scylla/scylla.yaml.backup-2021.1
|
||||
|
||||
Gracefully stop the node
|
||||
------------------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service scylla-enterprise-server stop
|
||||
|
||||
Download and install the new release
|
||||
------------------------------------
|
||||
Before upgrading, check what version you are running now using ``dpkg -l scylla\*server``. You should use the same version in case you want to |ROLLBACK|_ the upgrade. If you are not running a 2021.1.x version, stop right here! This guide only covers 2021.1.x to 2022.1.y upgrades.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
**To upgrade ScyllaDB:**
|
||||
|
||||
#. Update the |APT|_ to **2022.1** and enable scylla/ppa repo.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
Ubuntu 16:
|
||||
sudo add-apt-repository -y ppa:scylladb/ppa
|
||||
|
||||
#. Configure Java 1.8, which is requested by ScyllaDB Enterprise 2022.1.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y openjdk-8-jre-headless
|
||||
sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
|
||||
|
||||
#. Install:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get clean all
|
||||
sudo apt-get update
|
||||
sudo apt-get dist-upgrade scylla-enterprise
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
Start the node
|
||||
--------------
|
||||
|
||||
A new io.conf format was introduced in Scylla 2.3 and 2019.1. If your io.conf doesn't contain `--io-properties-file` option, then it's still the old format. You need to re-run the io setup to generate new io.conf.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo scylla_io_setup
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service scylla-enterprise-server start
|
||||
|
||||
Validate
|
||||
--------
|
||||
#. Check cluster status with ``nodetool status`` and make sure **all** nodes, including the one you just upgraded, are in UN status.
|
||||
#. Use ``curl -X GET "http://localhost:10000/storage_service/scylla_release_version"`` to check the ScyllaDB version.
|
||||
#. Check scylla-enterprise-server log (by ``journalctl _COMM=scylla``) and ``/var/log/syslog`` to validate there are no errors.
|
||||
#. Check again after two minutes to validate no new issues are introduced.
|
||||
|
||||
Once you are sure the node upgrade is successful, move to the next node in the cluster.
|
||||
|
||||
See :doc:`Scylla Metrics Update - Scylla Enterprise 2021.1 to 2022.1<metric-update-2021.1-to-2022.1>` for more information.
|
||||
|
||||
Rollback Procedure
|
||||
==================
|
||||
|
||||
.. include:: /upgrade/_common/warning_rollback.rst
|
||||
|
||||
The following procedure describes a rollback from ScyllaDB Enterprise release 2022.1.x to 2022.1.y. Apply this procedure if an upgrade from 2021.1 to 2022.1 failed before completing on all nodes. Use this procedure only for nodes you upgraded to 2022.1
|
||||
|
||||
ScyllaDB rollback is a rolling procedure that does **not** require a full cluster shutdown.
|
||||
For each of the nodes you rollback to 2021.1, you will:
|
||||
|
||||
* Drain the node and stop ScyllaDB
|
||||
* Retrieve the old Scylla packages
|
||||
* Restore the configuration file
|
||||
* Restart ScyllaDB
|
||||
* Validate the rollback success
|
||||
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating the node is up and running with the new version.
|
||||
|
||||
Rollback Steps
|
||||
==============
|
||||
Gracefully shutdown ScyllaDB
|
||||
----------------------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
nodetool drain
|
||||
sudo service scylla-enterprise-server stop
|
||||
|
||||
Download and install the old release
|
||||
------------------------------------
|
||||
#. Remove the old repo file.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo rm -rf /etc/apt/sources.list.d/scylla.list
|
||||
|
||||
#. Update the |APT|_ to **2021.1**.
|
||||
#. Install:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get clean all
|
||||
sudo apt-get update
|
||||
sudo apt-get remove scylla\* -y
|
||||
sudo apt-get install scylla-enterprise
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
Restore the configuration file
|
||||
------------------------------
|
||||
.. code:: sh
|
||||
|
||||
sudo rm -rf /etc/scylla/scylla.yaml
|
||||
sudo cp -a /etc/scylla/scylla.yaml.backup-2021.1 /etc/scylla/scylla.yaml
|
||||
|
||||
Restore system tables
|
||||
---------------------
|
||||
|
||||
Restore all tables of **system** and **system_schema** from the previous snapshot - 2022.1 uses a different set of system tables. Refer to :doc:`Restore from a Backup and Incremental Backup </operating-scylla/procedures/backup-restore/restore/>`.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
cd /var/lib/scylla/data/keyspace_name/table_name-UUID/snapshots/<snapshot_name>/
|
||||
sudo cp -r * /var/lib/scylla/data/keyspace_name/table_name-UUID/
|
||||
sudo chown -R scylla:scylla /var/lib/scylla/data/keyspace_name/table_name-UUID/
|
||||
|
||||
Start the node
|
||||
--------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service scylla-enterprise-server start
|
||||
|
||||
Validate
|
||||
--------
|
||||
Check the upgrade instructions above for validation. Once you are sure the node rollback is successful, move to the next node in the cluster.
|
||||
@@ -0,0 +1,2 @@
|
||||
.. include:: /upgrade/_common/upgrade-guide-v2022-ubuntu-and-debian-p1.rst
|
||||
.. include:: /upgrade/_common/upgrade-guide-v2022-ubuntu-and-debian-p2.rst
|
||||
@@ -2,89 +2,84 @@
|
||||
Upgrade Guide - |SCYLLA_NAME| |SRC_VERSION| to |NEW_VERSION| for |OS|
|
||||
=============================================================================================================
|
||||
|
||||
This document is a step by step procedure for upgrading from |SCYLLA_NAME| |SRC_VERSION| to |SCYLLA_NAME| |NEW_VERSION|, and rollback to |SRC_VERSION| if required.
|
||||
This document is a step by step procedure for upgrading from |SCYLLA_NAME| |SRC_VERSION| to |SCYLLA_NAME| |NEW_VERSION|, and rollback to version |SRC_VERSION| if required.
|
||||
|
||||
|
||||
Applicable versions
|
||||
Applicable Versions
|
||||
===================
|
||||
This guide covers upgrading Scylla from the following versions: |SRC_VERSION|.x or later to |SCYLLA_NAME| version |NEW_VERSION|.y, on the following platforms:
|
||||
|
||||
* |OS|
|
||||
This guide covers upgrading |SCYLLA_NAME| |SRC_VERSION| to |SCYLLA_NAME| |NEW_VERSION| on |OS|.
|
||||
See :doc:`OS Support by Platform and Version </getting-started/os-support>` for information about supported versions.
|
||||
|
||||
Upgrade Procedure
|
||||
=================
|
||||
|
||||
Upgrading your Scylla version is a rolling procedure that does not require a full cluster shutdown. For each of the nodes in the cluster, serially (i.e. one at a time), you will:
|
||||
Upgrading your ScyllaDB version is a rolling procedure that does not require a full cluster shutdown. For each of the nodes in the cluster, serially (i.e. one at a time), you will:
|
||||
|
||||
* Check the cluster's schema
|
||||
* Drain the node and backup the data
|
||||
* Backup the configuration file
|
||||
* Stop the Scylla service
|
||||
* Download and install new Scylla packages
|
||||
* Start the Scylla service
|
||||
* Stop ScyllaDB
|
||||
* Download and install new ScyllaDB packages
|
||||
* Start ScyllaDB
|
||||
* Validate that the upgrade was successful
|
||||
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating the node is up and running with the new version.
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating the node is up and running the new version.
|
||||
|
||||
**During** the rolling upgrade, it is highly recommended:
|
||||
|
||||
* Not to use new |NEW_VERSION| features
|
||||
* Not to run administration functions, like repairs, refresh, rebuild or add or remove nodes. See `sctool <https://manager.docs.scylladb.com/stable/sctool/index.html>`_ for suspending Scylla Manager (only available Scylla Enterprise) scheduled or running repairs.
|
||||
* Not to use the new |NEW_VERSION| features
|
||||
* Not to run administration functions, like repairs, refresh, rebuild or add or remove nodes. See `sctool <https://manager.docs.scylladb.com/stable/sctool/index.html>`_ for suspending ScyllaDB Manager (only available for ScyllaDB Enterprise) scheduled or running repairs.
|
||||
* Not to apply schema changes
|
||||
|
||||
.. note:: Before upgrading, make sure to use the latest `Scylla Montioring <https://monitoring.docs.scylladb.com/>`_ stack.
|
||||
.. note:: Before upgrading, make sure to use the latest `ScyllaDB Montioring <https://monitoring.docs.scylladb.com/>`_ stack.
|
||||
|
||||
Upgrade steps
|
||||
Upgrade Steps
|
||||
=============
|
||||
Check the cluster schema
|
||||
------------------------
|
||||
Make sure that all nodes have the schema synched prior to upgrade as any schema disagreement between the nodes causes the upgrade to fail.
|
||||
Make sure that all nodes have the schema synced before the upgrade. The upgrade will fail if there is a schema disagreement between nodes.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
nodetool describecluster
|
||||
|
||||
Drain node and backup the data
|
||||
------------------------------
|
||||
Before any major procedure, like an upgrade, it is **highly recommended** to backup all the data to an external device. In Scylla, backup is done using the ``nodetool snapshot`` command. For **each** node in the cluster, run the following command:
|
||||
Drain the nodes and backup the data
|
||||
--------------------------------------
|
||||
Before any major procedure, like an upgrade, it is recommended to backup all the data to an external device. In ScyllaDB, backup is done using the ``nodetool snapshot`` command. For **each** node in the cluster, run the following command:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
nodetool drain
|
||||
nodetool snapshot
|
||||
|
||||
Take note of the directory name that nodetool gives you, and copy all the directories having this name under ``/var/lib/scylla`` to an external backup device.
|
||||
Take note of the directory name that nodetool gives you, and copy all the directories having that name under ``/var/lib/scylla`` to an external backup device.
|
||||
|
||||
When the upgrade is complete (for all nodes), remove the snapshot by running ``nodetool clearsnapshot -t <snapshot>``, or you risk running out of disk space.
|
||||
When the upgrade is completed on all nodes, remove the snapshot with the ``nodetool clearsnapshot -t <snapshot>`` command to prevent running out of space.
|
||||
|
||||
Backup configuration file
|
||||
-------------------------
|
||||
Backup the configuration file
|
||||
------------------------------
|
||||
.. code:: sh
|
||||
|
||||
sudo cp -a /etc/scylla/scylla.yaml /etc/scylla/scylla.yaml.backup-src
|
||||
|
||||
Stop Scylla
|
||||
-----------
|
||||
Stop ScyllaDB
|
||||
---------------
|
||||
.. include:: /rst_include/scylla-commands-stop-index.rst
|
||||
|
||||
|
||||
Download and install the new release
|
||||
------------------------------------
|
||||
Before upgrading, check what Scylla version you are currently running with ``rpm -qa | grep scylla-server``. You should use the same version as this version in case you want to :ref:`rollback <rollback-procedure>` the upgrade. If you are not running a |SRC_VERSION|.x version, stop right here! This guide only covers |SRC_VERSION|.x to |NEW_VERSION|.y upgrades.
|
||||
Before upgrading, check what version you are running now using ``rpm -qa | grep scylla-server``. You should use the same version as this version in case you want to :ref:`rollback <rollback-procedure>` the upgrade. If you are not running a |SRC_VERSION|.x version, stop right here! This guide only covers |SRC_VERSION|.x to |NEW_VERSION|.y upgrades.
|
||||
|
||||
To upgrade:
|
||||
|
||||
1. Update the |SCYLLA_REPO|_ to |NEW_VERSION|
|
||||
2. Install the new Scylla version
|
||||
#. Update the |SCYLLA_REPO|_ to |NEW_VERSION|.
|
||||
#. Install the new ScyllaDB version:
|
||||
|
||||
.. code:: sh
|
||||
.. code:: sh
|
||||
|
||||
sudo yum clean all
|
||||
sudo yum update scylla\* -y
|
||||
|
||||
.. note::
|
||||
|
||||
Alternator users upgrading from Scylla 4.0 to 4.1, need to set :doc:`default isolation level </upgrade/upgrade-opensource/upgrade-guide-from-4.0-to-4.1/alternator>`
|
||||
sudo yum clean all
|
||||
sudo yum update scylla\* -y
|
||||
|
||||
|
||||
Start the node
|
||||
@@ -94,62 +89,63 @@ Start the node
|
||||
|
||||
Validate
|
||||
--------
|
||||
1. Check cluster status with ``nodetool status`` and make sure **all** nodes, including the one you just upgraded, are in UN status.
|
||||
2. Use ``curl -X GET "http://localhost:10000/storage_service/scylla_release_version"`` to check the Scylla version. Validate that the version matches the one you upgraded to.
|
||||
3. Use ``journalctl _COMM=scylla`` to check there are no new errors in the log.
|
||||
4. Check again after two minutes, to validate no new issues are introduced.
|
||||
#. Check cluster status with ``nodetool status`` and make sure **all** nodes, including the one you just upgraded, are in UN status.
|
||||
#. Use ``curl -X GET "http://localhost:10000/storage_service/scylla_release_version"`` to check the ScyllaDB version. Validate that the version matches the one you upgraded to.
|
||||
#. Use ``journalctl _COMM=scylla`` to check there are no new errors in the log.
|
||||
#. Check again after two minutes, to validate no new issues are introduced.
|
||||
|
||||
Once you are sure the node upgrade was successful, move to the next node in the cluster.
|
||||
|
||||
* More on |Scylla_METRICS|_
|
||||
See |Scylla_METRICS|_ for more information..
|
||||
|
||||
Rollback Procedure
|
||||
==================
|
||||
|
||||
.. include:: /upgrade/_common/warning_rollback.rst
|
||||
|
||||
The following procedure describes a rollback from |SCYLLA_NAME| release |NEW_VERSION|.x to |SRC_VERSION|.y. Apply this procedure if an upgrade from |SRC_VERSION| to |NEW_VERSION| failed before completing on all nodes. Use this procedure only for the nodes that you upgraded to |NEW_VERSION|
|
||||
The following procedure describes a rollback from |SCYLLA_NAME| release |NEW_VERSION|.x to |SRC_VERSION|.y. Apply this procedure if an upgrade from |SRC_VERSION| to |NEW_VERSION| failed before completing on all nodes. Use this procedure only for the nodes that you upgraded to |NEW_VERSION|.
|
||||
|
||||
|
||||
Scylla rollback is a rolling procedure that does **not** require a full cluster shutdown.
|
||||
For each of the nodes rollback to |SRC_VERSION|, you will:
|
||||
ScyllaDB rollback is a rolling procedure that does **not** require a full cluster shutdown.
|
||||
For each of the nodes you rollback to |SRC_VERSION|, you will:
|
||||
|
||||
* Drain the node and stop Scylla
|
||||
* Retrieve the old Scylla packages
|
||||
* Drain the node and stop ScyllaDB
|
||||
* Retrieve the old ScyllaDB packages
|
||||
* Restore the configuration file
|
||||
* Reload the systemd configuration
|
||||
* Restart the Scylla service
|
||||
* Restart ScyllaDB
|
||||
* Validate the rollback success
|
||||
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating the rollback was successful and that the node is up and running with the old version.
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating the rollback was successful and that the node is up and running the old version.
|
||||
|
||||
Rollback steps
|
||||
Rollback Steps
|
||||
==============
|
||||
Gracefully shutdown Scylla
|
||||
--------------------------
|
||||
Gracefully shutdown ScyllaDB
|
||||
-----------------------------
|
||||
.. code:: sh
|
||||
|
||||
nodetool drain
|
||||
.. include:: /rst_include/scylla-commands-stop-index.rst
|
||||
|
||||
Download and install the new release
|
||||
Download and install the old release
|
||||
------------------------------------
|
||||
1. Remove the old repo file.
|
||||
#. Remove the old repo file.
|
||||
|
||||
.. code:: sh
|
||||
.. code:: sh
|
||||
|
||||
sudo rm -rf /etc/yum.repos.d/scylla.repo
|
||||
sudo rm -rf /etc/yum.repos.d/scylla.repo
|
||||
|
||||
2. Update the |SCYLLA_REPO|_ to |SRC_VERSION|
|
||||
3. Install
|
||||
#. Update the |SCYLLA_REPO|_ to |SRC_VERSION|.
|
||||
#. Install:
|
||||
|
||||
.. code:: console
|
||||
|
||||
sudo yum clean all
|
||||
sudo rm -rf /var/cache/yum
|
||||
sudo yum remove scylla\\*tools-core
|
||||
sudo yum downgrade scylla\\* -y
|
||||
sudo yum install scylla
|
||||
|
||||
.. parsed-literal::
|
||||
\ sudo yum clean all
|
||||
\ sudo rm -rf /var/cache/yum
|
||||
\ sudo yum remove scylla\\*tools-core
|
||||
\ sudo yum downgrade scylla\\* -y
|
||||
\ sudo yum install |PKG_NAME|
|
||||
\
|
||||
|
||||
Restore the configuration file
|
||||
------------------------------
|
||||
@@ -162,7 +158,7 @@ Restore the configuration file
|
||||
Restore system tables
|
||||
---------------------
|
||||
|
||||
Restore all tables of **system** and **system_schema** from previous snapshot, |NEW_VERSION| uses a different set of system tables. Reference doc: :doc:`Restore from a Backup and Incremental Backup </operating-scylla/procedures/backup-restore/restore/>`
|
||||
Restore all tables of **system** and **system_schema** from previous snapshot because |NEW_VERSION| uses a different set of system tables. See :doc:`Restore from a Backup and Incremental Backup </operating-scylla/procedures/backup-restore/restore/>` for details.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
@@ -173,7 +169,7 @@ Restore all tables of **system** and **system_schema** from previous snapshot, |
|
||||
Reload systemd configuration
|
||||
---------------------------------
|
||||
|
||||
Require to reload the unit file if the systemd unit file is changed.
|
||||
You must reload the unit file if the systemd unit file is changed.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
@@ -182,9 +178,8 @@ Require to reload the unit file if the systemd unit file is changed.
|
||||
Start the node
|
||||
--------------
|
||||
|
||||
|
||||
.. include:: /rst_include/scylla-commands-start-index.rst
|
||||
|
||||
Validate
|
||||
--------
|
||||
Check the upgrade instruction above for validation. Once you are sure the node rollback is successful, move to the next node in the cluster. Keep in mind that the version you want to see on your node is the old version, which you noted at the beginning of the procedure.
|
||||
Check the upgrade instructions above for validation. Once you are sure the node rollback is successful, move to the next node in the cluster.
|
||||
|
||||
@@ -96,30 +96,6 @@ Answer ‘y’ to the first two questions.
|
||||
|
||||
Alternator users upgrading from Scylla 4.0 to 4.1, need to set :doc:`default isolation level </upgrade/upgrade-opensource/upgrade-guide-from-4.0-to-4.1/alternator>`
|
||||
|
||||
Update 3rd party and OS packages
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: Scylla 5.0
|
||||
.. versionadded:: Scylla Enterprise 2021.1.10
|
||||
|
||||
This step is optional. It is recommended if you run a Scylla official image (EC2 AMI, GCP, and Azure images) based on Ubuntu 20.04.
|
||||
|
||||
Run the following command:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
cat scylla-packages-xxx-x86_64.txt | sudo xargs -n1 apt-get -y
|
||||
|
||||
|
||||
Where xxx is the relevant Scylla version ( |NEW_VERSION| ). The file is included in the Scylla packages downloaded in the previous step.
|
||||
|
||||
For example
|
||||
|
||||
.. code:: sh
|
||||
|
||||
cat scylla-packages-5.1.2-x86_64.txt | sudo xargs -n1 apt-get -y
|
||||
|
||||
|
||||
Start the node
|
||||
--------------
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
Upgrade Guide - |SCYLLA_NAME| |SRC_VERSION| to |NEW_VERSION| for |OS|
|
||||
======================================================================
|
||||
|
||||
This document is a step-by-step procedure for upgrading from |SCYLLA_NAME| |FROM| to |SCYLLA_NAME| |TO|, and rollback to 2021.1 if required.
|
||||
|
||||
|
||||
Applicable Versions
|
||||
------------------------
|
||||
This guide covers upgrading |SCYLLA_NAME| from version |FROM| to version |TO| on |OS|. See :doc:`OS Support by Platform and Version </getting-started/os-support>` for information about supported versions.
|
||||
|
||||
|
||||
Upgrade Procedure
|
||||
----------------------------
|
||||
|
||||
.. note::
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating the node is up and running the new version.
|
||||
|
||||
A ScyllaDB upgrade is a rolling procedure which does **not** require full cluster shutdown.
|
||||
For each of the nodes in the cluster, you will:
|
||||
|
||||
* Drain node and backup the data.
|
||||
* Check your current release.
|
||||
* Backup configuration file.
|
||||
* Stop ScyllaDB.
|
||||
* Download and install new ScyllaDB packages.
|
||||
* Start ScyllaDB.
|
||||
* Validate that the upgrade was successful.
|
||||
|
||||
|
||||
**During** the rolling upgrade it is highly recommended:
|
||||
|
||||
* Not to use new |TO| features.
|
||||
* Not to run administration functions, like repairs, refresh, rebuild or add or remove nodes.
|
||||
* Not to apply schema changes.
|
||||
|
||||
Upgrade steps
|
||||
-------------------------------
|
||||
Drain node and backup the data
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Before any major procedure, like an upgrade, it is recommended to backup all the data to an external device. In ScyllaDB, backup is done using the ``nodetool snapshot`` command. For **each** node in the cluster, run the following command:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
nodetool drain
|
||||
nodetool snapshot
|
||||
|
||||
Take note of the directory name that nodetool gives you, and copy all the directories having this name under ``/var/lib/scylla`` to a backup device.
|
||||
|
||||
When the upgrade is complete (all nodes), the snapshot should be removed by ``nodetool clearsnapshot -t <snapshot>``, or you risk running out of space.
|
||||
|
||||
|
||||
Backup configuration file
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo cp -a /etc/scylla/scylla.yaml /etc/scylla/scylla.yaml.backup-5.x.z
|
||||
|
||||
Gracefully stop the node
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service scylla-server stop
|
||||
|
||||
Download and install the new release
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Before upgrading, check what version you are running now using ``dpkg -s scylla-server``. You should use the same version in case you want to |ROLLBACK|_ the upgrade. If you are not running a |FROM| version, stop right here! This guide only covers |FROM| to |TO| upgrades.
|
||||
@@ -0,0 +1,84 @@
|
||||
**To upgrade ScyllaDB:**
|
||||
|
||||
#. Update the |APT|_ to |NEW_VERSION|.
|
||||
#. Install:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get dist-upgrade scylla
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
Start the node
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service scylla-server start
|
||||
|
||||
Validate
|
||||
^^^^^^^^^^^^^^^^
|
||||
#. Check cluster status with ``nodetool status`` and make sure **all** nodes, including the one you just upgraded, are in UN status.
|
||||
#. Use ``curl -X GET "http://localhost:10000/storage_service/scylla_release_version"`` to check the ScyllaDB version.
|
||||
#. Check the scylla-server log (execute ``journalctl _COMM=scylla``) and ``/var/log/syslog`` to validate there are no errors.
|
||||
#. Check again after 2 minutes, to validate no new issues are introduced.
|
||||
|
||||
Once you are sure the node upgrade is successful, move to the next node in the cluster.
|
||||
|
||||
Rollback Procedure
|
||||
-----------------------
|
||||
|
||||
.. include:: /upgrade/_common/warning_rollback.rst
|
||||
|
||||
The following procedure describes a rollback from ScyllaDB release |TO| to |FROM|. Apply this procedure if an upgrade from |FROM| to |TO| failed before completing on all nodes. Use this procedure only for nodes you upgraded to |TO|.
|
||||
|
||||
ScyllaDB rollback is a rolling procedure which does **not** require full cluster shutdown.
|
||||
For each of the nodes rollback to |FROM|, you will:
|
||||
|
||||
* Drain the node and stop ScyllaDB.
|
||||
* Downgrade to previous release.
|
||||
* Restore the configuration file.
|
||||
* Restart ScyllaDB.
|
||||
* Validate the rollback success.
|
||||
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating the node is up and running with the new version.
|
||||
|
||||
Rollback steps
|
||||
------------------------
|
||||
Gracefully shutdown ScyllaDB
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code:: sh
|
||||
|
||||
nodetool drain
|
||||
sudo service scylla-server stop
|
||||
|
||||
Downgrade to previous release
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Install:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get install scylla=5.x.y\* scylla-server=5.x.y\* scylla-jmx=5.x.y\* scylla-tools=5.x.y\* scylla-tools-core=5.x.y\* scylla-kernel-conf=5.x.y\* scylla-conf=5.x.y\*
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
Restore the configuration file
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo rm -rf /etc/scylla/scylla.yaml
|
||||
sudo cp -a /etc/scylla/scylla.yaml.backup-5.x.z /etc/scylla/scylla.yaml
|
||||
|
||||
Start the node
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service scylla-server start
|
||||
|
||||
Validate
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
Check upgrade instruction above for validation. Once you are sure the node rollback is successful, move to the next node in the cluster.
|
||||
@@ -0,0 +1,2 @@
|
||||
.. include:: /upgrade/_common/upgrade-guide-v5-patch-ubuntu-and-debian-p1.rst
|
||||
.. include:: /upgrade/_common/upgrade-guide-v5-patch-ubuntu-and-debian-p2.rst
|
||||
@@ -2,49 +2,43 @@
|
||||
Upgrade Guide - |SCYLLA_NAME| |SRC_VERSION| to |NEW_VERSION| for |OS|
|
||||
=============================================================================
|
||||
|
||||
This document is a step by step procedure for upgrading from |SCYLLA_NAME| |SRC_VERSION| to |SCYLLA_NAME| |NEW_VERSION|, and rollback to |SRC_VERSION| if required.
|
||||
This document is a step by step procedure for upgrading from |SCYLLA_NAME| |SRC_VERSION| to |SCYLLA_NAME| |NEW_VERSION|, and rollback to version |SRC_VERSION| if required.
|
||||
|
||||
..
|
||||
Relevant and tested for Ubuntu 20.04. Remove from other OSes and versions.
|
||||
|
||||
There are two upgrade alternatives: you can upgrade ScyllaDB simultaneously updating 3rd party and OS packages (recommended for Ubuntu 20.04), or upgrade ScyllaDB without updating any external packages.
|
||||
|
||||
Applicable versions
|
||||
Applicable Versions
|
||||
===================
|
||||
This guide covers upgrading Scylla from version |SRC_VERSION|.x or later to |SCYLLA_NAME| version |NEW_VERSION|.y on the following platform:
|
||||
|
||||
* |OS|
|
||||
This guide covers upgrading |SCYLLA_NAME| |SRC_VERSION| to |SCYLLA_NAME| |NEW_VERSION| on |OS|.
|
||||
See :doc:`OS Support by Platform and Version </getting-started/os-support>` for information about supported versions.
|
||||
|
||||
Upgrade Procedure
|
||||
=================
|
||||
|
||||
A Scylla upgrade is a rolling procedure which does **not** require full cluster shutdown.
|
||||
A ScyllaDB upgrade is a rolling procedure which does **not** require full cluster shutdown.
|
||||
For each of the nodes in the cluster, you will:
|
||||
|
||||
* Check cluster schema
|
||||
* Drain node and backup the data
|
||||
* Backup configuration file
|
||||
* Stop Scylla
|
||||
* Download and install new Scylla packages
|
||||
* Start Scylla
|
||||
* Check the cluster's schema
|
||||
* Drain the node and backup the data
|
||||
* Backup the configuration file
|
||||
* Stop ScyllaDB
|
||||
* Download and install new ScyllaDB packages
|
||||
* Start ScyllaDB
|
||||
* Validate that the upgrade was successful
|
||||
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating that the node you upgraded is up and running with the new version.
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating that the node you upgraded is up and running the new version.
|
||||
|
||||
|
||||
**During** the rolling upgrade, it is highly recommended:
|
||||
|
||||
* Not to use new |NEW_VERSION| features
|
||||
* Not to run administration functions, like repairs, refresh, rebuild or add or remove nodes. See `here <https://manager.docs.scylladb.com/stable/sctool/>`_ for suspending Scylla Manager (only available Scylla Enterprise) scheduled or running repairs.
|
||||
* Not to use the new |NEW_VERSION| features
|
||||
* Not to run administration functions, like repairs, refresh, rebuild or add or remove nodes. See `sctool <https://manager.docs.scylladb.com/stable/sctool/>`_ for suspending ScyllaDB Manager (only available for ScyllaDB Enterprise) scheduled or running repairs.
|
||||
* Not to apply schema changes
|
||||
|
||||
.. note:: Before upgrading, make sure to use the latest `Scylla Montioring <https://monitoring.docs.scylladb.com/>`_ stack.
|
||||
.. note:: Before upgrading, make sure to use the latest `ScyllaDB Montioring <https://monitoring.docs.scylladb.com/>`_ stack.
|
||||
|
||||
Upgrade steps
|
||||
Upgrade Steps
|
||||
=============
|
||||
Check the cluster schema
|
||||
-------------------------
|
||||
Make sure that all nodes have the schema synched before the upgrade. The upgrade will fail if there is any disagreement between the nodes.
|
||||
Make sure that all nodes have the schema synced before the upgrade. The upgrade will fail if there is a schema disagreement between nodes.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
@@ -59,12 +53,12 @@ Before any major procedure, like an upgrade, it is recommended to backup all the
|
||||
nodetool drain
|
||||
nodetool snapshot
|
||||
|
||||
Take note of the directory name that nodetool gives you, and copy all the directories having this name under ``/var/lib/scylla`` to a backup device.
|
||||
Take note of the directory name that nodetool gives you, and copy all the directories having that name under ``/var/lib/scylla`` to a backup device.
|
||||
|
||||
When the upgrade is complete on all nodes, the snapshot should be removed by ``nodetool clearsnapshot -t <snapshot>`` to prevent running out of space.
|
||||
When the upgrade is completed on all nodes, remove the snapshot with the ``nodetool clearsnapshot -t <snapshot>`` command to prevent running out of space.
|
||||
|
||||
Backup configuration file
|
||||
-------------------------
|
||||
Backup the configuration file
|
||||
------------------------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
@@ -81,27 +75,4 @@ Download and install the new release
|
||||
------------------------------------
|
||||
Before upgrading, check what version you are running now using ``dpkg -s scylla-server``. You should use the same version in case you want to |ROLLBACK|_ the upgrade. If you are not running a |SRC_VERSION|.x version, stop right here! This guide only covers |SRC_VERSION|.x to |NEW_VERSION|.y upgrades.
|
||||
|
||||
**To upgrade ScyllaDB:**
|
||||
|
||||
1. Update the |SCYLLA_REPO|_ to |NEW_VERSION|
|
||||
|
||||
2. Install
|
||||
|
||||
.. code-block::
|
||||
|
||||
sudo apt-get clean all
|
||||
sudo apt-get update
|
||||
sudo apt-get dist-upgrade |PKG_NAME|
|
||||
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
**To upgrade ScyllaDB and update 3rd party and OS packages:**
|
||||
|
||||
.. include:: /upgrade/_common/upgrade-image.rst
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
Alternator users upgrading from Scylla 4.0 to 4.1 need to set :doc:`default isolation level </upgrade/upgrade-opensource/upgrade-guide-from-4.0-to-4.1/alternator>`.
|
||||
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
**To upgrade ScyllaDB:**
|
||||
|
||||
#. Update the |SCYLLA_REPO|_ to |NEW_VERSION|.
|
||||
|
||||
#. Install:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo apt-get clean all
|
||||
sudo apt-get update
|
||||
sudo apt-get dist-upgrade scylla
|
||||
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
Start the node
|
||||
--------------
|
||||
|
||||
@@ -7,10 +22,10 @@ Start the node
|
||||
|
||||
Validate
|
||||
--------
|
||||
1. Check cluster status with ``nodetool status`` and make sure **all** nodes, including the one you just upgraded, are in UN status.
|
||||
2. Use ``curl -X GET "http://localhost:10000/storage_service/scylla_release_version"`` to check the Scylla version.
|
||||
3. Check scylla-server log (by ``journalctl _COMM=scylla``) and ``/var/log/syslog`` to validate there are no errors.
|
||||
4. Check again after two minutes to validate no new issues are introduced.
|
||||
#. Check cluster status with ``nodetool status`` and make sure **all** nodes, including the one you just upgraded, are in UN status.
|
||||
#. Use ``curl -X GET "http://localhost:10000/storage_service/scylla_release_version"`` to check the Scylla version.
|
||||
#. Check scylla-server log (by ``journalctl _COMM=scylla``) and ``/var/log/syslog`` to validate there are no errors.
|
||||
#. Check again after two minutes to validate no new issues are introduced.
|
||||
|
||||
Once you are sure the node upgrade is successful, move to the next node in the cluster.
|
||||
|
||||
@@ -21,25 +36,25 @@ Rollback Procedure
|
||||
|
||||
.. include:: /upgrade/_common/warning_rollback.rst
|
||||
|
||||
The following procedure describes a rollback from |SCYLLA_NAME| release |NEW_VERSION|.x to |SRC_VERSION|.y. Apply this procedure if an upgrade from |SRC_VERSION| to |NEW_VERSION| failed before completing on all nodes. Use this procedure only for nodes you upgraded to |NEW_VERSION|.
|
||||
The following procedure describes a rollback from |SCYLLA_NAME| |NEW_VERSION|.x to |SRC_VERSION|.y. Apply this procedure if an upgrade from |SRC_VERSION| to |NEW_VERSION| failed before completing on all nodes. Use this procedure only for nodes you upgraded to |NEW_VERSION|.
|
||||
|
||||
Scylla rollback is a rolling procedure which does **not** require full cluster shutdown.
|
||||
For each of the nodes rollback to |SRC_VERSION|, you will:
|
||||
ScyllaDB rollback is a rolling procedure which does **not** require full cluster shutdown.
|
||||
For each of the nodes you rollback to |SRC_VERSION|, you will:
|
||||
|
||||
* Drain the node and stop Scylla
|
||||
* Retrieve the old Scylla packages
|
||||
* Retrieve the old ScyllaDB packages
|
||||
* Restore the configuration file
|
||||
* Restore system tables
|
||||
* Reload systemd configuration
|
||||
* Restart Scylla
|
||||
* Restart ScyllaDB
|
||||
* Validate the rollback success
|
||||
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating the node is up and running with the new version.
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating the node is up and running the old version.
|
||||
|
||||
Rollback steps
|
||||
Rollback Steps
|
||||
==============
|
||||
Gracefully shutdown Scylla
|
||||
--------------------------
|
||||
Gracefully shutdown ScyllaDB
|
||||
----------------------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
@@ -48,20 +63,20 @@ Gracefully shutdown Scylla
|
||||
|
||||
Download and install the old release
|
||||
------------------------------------
|
||||
1. Remove the old repo file.
|
||||
#. Remove the old repo file.
|
||||
|
||||
.. code:: sh
|
||||
.. code:: sh
|
||||
|
||||
sudo rm -rf /etc/apt/sources.list.d/scylla.list
|
||||
sudo rm -rf /etc/apt/sources.list.d/scylla.list
|
||||
|
||||
2. Update the |SCYLLA_REPO|_ to |SRC_VERSION|
|
||||
3. Install
|
||||
#. Update the |SCYLLA_REPO|_ to |SRC_VERSION|.
|
||||
#. Install:
|
||||
|
||||
.. code-block::
|
||||
.. code-block::
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get remove scylla\* -y
|
||||
sudo apt-get install |PKG_NAME|
|
||||
sudo apt-get update
|
||||
sudo apt-get remove scylla\* -y
|
||||
sudo apt-get install scylla
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
@@ -75,7 +90,7 @@ Restore the configuration file
|
||||
Restore system tables
|
||||
---------------------
|
||||
|
||||
Restore all tables of **system** and **system_schema** from the previous snapshot - |NEW_VERSION| uses a different set of system tables. See :doc:`Restore from a Backup and Incremental Backup </operating-scylla/procedures/backup-restore/restore/>` for reference.
|
||||
Restore all tables of **system** and **system_schema** from the previous snapshot because |NEW_VERSION| uses a different set of system tables. See :doc:`Restore from a Backup and Incremental Backup </operating-scylla/procedures/backup-restore/restore/>` for reference.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
|
||||
52
docs/upgrade/_common/upgrade-image-enterprise.rst
Normal file
52
docs/upgrade/_common/upgrade-image-enterprise.rst
Normal file
@@ -0,0 +1,52 @@
|
||||
There are two alternative upgrade procedures:
|
||||
|
||||
* :ref:`Upgrading ScyllaDB and simultaneously updating 3rd party and OS packages <upgrade-image-recommended-procedure>`. It is recommended if you are running a ScyllaDB official image (EC2 AMI, GCP, and Azure images), which is based on Ubuntu 20.04.
|
||||
|
||||
* :ref:`Upgrading ScyllaDB without updating any external packages <upgrade-image-enterprise-upgrade-guide-regular-procedure>`.
|
||||
|
||||
.. _upgrade-image-recommended-procedure:
|
||||
|
||||
**To upgrade ScyllaDB and update 3rd party and OS packages (RECOMMENDED):**
|
||||
|
||||
.. versionadded:: 2021.1.10
|
||||
|
||||
Choosing this upgrade procedure allows you to upgrade your ScyllaDB version and update the 3rd party and OS packages using one command.
|
||||
|
||||
#. Update the |SCYLLA_REPO|_ to |NEW_VERSION|.
|
||||
|
||||
#. Load the new repo:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
#. Run the following command to update the manifest file:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
cat scylla-enterprise-packages-<version>-<arch>.txt | sudo xargs -n1 apt-get install -y
|
||||
|
||||
Where:
|
||||
|
||||
* ``<version>`` - The ScyllaDB version to which you are upgrading ( |NEW_VERSION| ).
|
||||
* ``<arch>`` - Architecture type: ``x86_64`` or ``aarch64``.
|
||||
|
||||
The file is included in the ScyllaDB packages downloaded in the previous step. The file location is ``http://downloads.scylladb.com/downloads/scylla-enterprise/aws/manifest/scylla-enterprise-packages-<version>-<arch>.txt``.
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: console
|
||||
|
||||
cat scylla-enterprise-packages-2022.1.10-x86_64.txt | sudo xargs -n1 apt-get install -y
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
Alternatively, you can update the manifest file with the following command:
|
||||
|
||||
``sudo apt-get install $(awk '{print $1'} scylla-enterprise-packages-<version>-<arch>.txt) -y``
|
||||
|
||||
|
||||
|
||||
|
||||
.. _upgrade-image-enterprise-upgrade-guide-regular-procedure:
|
||||
49
docs/upgrade/_common/upgrade-image-opensource.rst
Normal file
49
docs/upgrade/_common/upgrade-image-opensource.rst
Normal file
@@ -0,0 +1,49 @@
|
||||
There are two alternative upgrade procedures:
|
||||
|
||||
* :ref:`Upgrading ScyllaDB and simultaneously updating 3rd party and OS packages <upgrade-image-recommended-procedure>`. It is recommended if you are running a ScyllaDB official image (EC2 AMI, GCP, and Azure images), which is based on Ubuntu 20.04.
|
||||
|
||||
* :ref:`Upgrading ScyllaDB without updating any external packages <upgrade-image-upgrade-guide-regular-procedure>`.
|
||||
|
||||
.. _upgrade-image-recommended-procedure:
|
||||
|
||||
**To upgrade ScyllaDB and update 3rd party and OS packages (RECOMMENDED):**
|
||||
|
||||
.. versionadded:: 5.0
|
||||
|
||||
Choosing this upgrade procedure allows you to upgrade your ScyllaDB version and update the 3rd party and OS packages using one command.
|
||||
|
||||
#. Update the |SCYLLA_REPO|_ to |NEW_VERSION|.
|
||||
|
||||
#. Load the new repo:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
|
||||
#. Run the following command to update the manifest file:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
cat scylla-packages-<version>-<arch>.txt | sudo xargs -n1 apt-get install -y
|
||||
|
||||
Where:
|
||||
|
||||
* ``<version>`` - The ScyllaDB version to which you are upgrading ( |NEW_VERSION| ).
|
||||
* ``<arch>`` - Architecture type: ``x86_64`` or ``aarch64``.
|
||||
|
||||
The file is included in the ScyllaDB packages downloaded in the previous step. The file location is ``http://downloads.scylladb.com/downloads/scylla/aws/manifest/scylla-packages-<version>-<arch>.txt``
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
cat scylla-packages-5.1.2-x86_64.txt | sudo xargs -n1 apt-get install -y
|
||||
|
||||
.. note::
|
||||
|
||||
Alternatively, you can update the manifest file with the following command:
|
||||
|
||||
``sudo apt-get install $(awk '{print $1'} scylla-packages-<version>-<arch>.txt) -y``
|
||||
|
||||
.. _upgrade-image-upgrade-guide-regular-procedure:
|
||||
@@ -1,21 +0,0 @@
|
||||
.. versionadded:: Scylla 5.0
|
||||
.. versionadded:: Scylla Enterprise 2021.1.10
|
||||
|
||||
This alternative installation upgrade method allows you to upgrade your ScyllaDB version and update the 3rd party and OS packages using one command. This method is recommended if you run a ScyllaDB official image (EC2 AMI, GCP, and Azure images) based on Ubuntu 20.04.
|
||||
|
||||
#. Update the |SCYLLA_REPO|_ to |NEW_VERSION|.
|
||||
|
||||
#. Run the following command:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
cat scylla-packages-xxx-x86_64.txt | sudo xargs -n1 apt-get -y
|
||||
|
||||
|
||||
Where xxx is the relevant Scylla version ( |NEW_VERSION| ). The file is included in the Scylla packages downloaded in the previous step.
|
||||
|
||||
For example
|
||||
|
||||
.. code:: sh
|
||||
|
||||
cat scylla-packages-5.1.2-x86_64.txt | sudo xargs -n1 apt-get -y
|
||||
@@ -7,12 +7,12 @@ Upgrade from ScyllaDB Enterprise 2021.1 to 2022.1
|
||||
:titlesonly:
|
||||
|
||||
Red Hat Enterprise Linux and CentOS <upgrade-guide-from-2021.1-to-2022.1-rpm>
|
||||
Ubuntu 18.04 <upgrade-guide-from-2021.1-to-2022.1-ubuntu-18-04>
|
||||
Ubuntu 20.04 <upgrade-guide-from-2021.1-to-2022.1-ubuntu-20-04>
|
||||
Ubuntu <upgrade-guide-from-2021.1-to-2022.1-ubuntu>
|
||||
Debian <upgrade-guide-from-2021.1-to-2022.1-debian>
|
||||
ScyllaDB Image <upgrade-guide-from-2021.1-to-2022.1-image>
|
||||
Metrics <metric-update-2021.1-to-2022.1>
|
||||
|
||||
.. raw:: html
|
||||
.. raw:: htm
|
||||
|
||||
|
||||
<div class="panel callout radius animated">
|
||||
@@ -25,9 +25,9 @@ Upgrade from ScyllaDB Enterprise 2021.1 to 2022.1
|
||||
Upgrade guides are available for:
|
||||
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 2021.1.x to 2022.1.y on Red Hat Enterprise Linux and CentOS <upgrade-guide-from-2021.1-to-2022.1-rpm>`
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 2021.1.x to 2022.1.y on Ubuntu 18.04 <upgrade-guide-from-2021.1-to-2022.1-ubuntu-18-04>`
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 2021.1.x to 2022.1.y on Ubuntu 20.04 <upgrade-guide-from-2021.1-to-2022.1-ubuntu-20-04>`
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 2021.1.x to 2022.1.y on Ubuntu <upgrade-guide-from-2021.1-to-2022.1-ubuntu>`
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 2021.1.x to 2022.1.y on Debian <upgrade-guide-from-2021.1-to-2022.1-debian>`
|
||||
* :doc:`Upgrade ScyllaDB Enterprise Image (EC2, GCP, and Azure) from 2021.1.x to 2022.1.y <upgrade-guide-from-2021.1-to-2022.1-image>`
|
||||
* :doc:`ScyllaDB Enterprise Metrics Update - Scylla 2021.1 to 2022.1<metric-update-2021.1-to-2022.1>`
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
.. |OS| replace:: Debian 9
|
||||
.. |OS| replace:: Debian
|
||||
.. |ROLLBACK| replace:: rollback
|
||||
.. _ROLLBACK: /upgrade/upgrade-enterprise/upgrade-guide-from-2021.1-to-2022.1/upgrade-guide-from-2021.1-to-2022.1-debian/#rollback-procedure
|
||||
.. _ROLLBACK: /upgrade/upgrade-enterprise/upgrade-guide-from-2021.1-to-2022.1/upgrade-guide-from-2021.1-to-2022.1/#rollback-procedure
|
||||
.. |SRC_VERSION| replace:: 2021.1
|
||||
.. |NEW_VERSION| replace:: 2022.1
|
||||
.. |SCYLLA_NAME| replace:: ScyllaDB Enterprise
|
||||
.. |PKG_NAME| replace:: scylla
|
||||
.. |APT| replace:: ScyllaDB Enterprise Deb repo
|
||||
.. _APT: https://www.scylladb.com/customer-portal/?product=ent&platform=debian-9&version=stable-release-2022.1
|
||||
.. |SCYLLA_REPO| replace:: ScyllaDB Enterprise Deb repo
|
||||
.. _SCYLLA_REPO: https://www.scylladb.com/customer-portal/?product=ent&platform=debian-9&version=stable-release-2022.1
|
||||
.. |OPENJDK| replace:: openjdk-8-jre-headless
|
||||
.. include:: /upgrade/_common/upgrade-guide-from-2021.1-to-2022.1-ubuntu-and-debian.rst
|
||||
.. include:: /upgrade/_common/upgrade-guide-v2022-ubuntu-and-debian.rst
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
.. |OS| replace:: EC2, GCP, and Azure
|
||||
.. |ROLLBACK| replace:: rollback
|
||||
.. _ROLLBACK: /upgrade/upgrade-enterprise/upgrade-guide-from-2021.1-to-2022.1/upgrade-guide-from-2021.1-to-2022.1-image/#rollback-procedure
|
||||
.. |SRC_VERSION| replace:: 2021.1
|
||||
.. |NEW_VERSION| replace:: 2022.1
|
||||
.. |SCYLLA_NAME| replace:: ScyllaDB Image
|
||||
.. |PKG_NAME| replace:: scylla
|
||||
.. |APT| replace:: ScyllaDB Enterprise Deb repo
|
||||
.. _APT: https://www.scylladb.com/customer-portal/?product=ent&platform=ubuntu-20.04&version=stable-release-2022.1
|
||||
.. |SCYLLA_REPO| replace:: ScyllaDB Enterprise Deb repo
|
||||
.. _SCYLLA_REPO: https://www.scylladb.com/customer-portal/?product=ent&platform=ubuntu-20.04&version=stable-release-2022.1
|
||||
.. |SCYLLA_METRICS| replace:: Scylla Metrics Update - Scylla 2021.1 to 2022.1
|
||||
.. _SCYLLA_METRICS: ../metric-update-2021.1-to-2022.1
|
||||
.. |OPENJDK| replace:: openjdk-8-jre-headless
|
||||
.. include:: /upgrade/_common/upgrade-guide-v2022-ubuntu-and-debian-p1.rst
|
||||
.. include:: /upgrade/_common/upgrade-image-enterprise.rst
|
||||
.. include:: /upgrade/_common/upgrade-guide-v2022-ubuntu-and-debian-p2.rst
|
||||
|
||||
@@ -7,7 +7,7 @@ This document is a step-by-step procedure for upgrading from ScyllaDB Enterprise
|
||||
|
||||
Applicable Versions
|
||||
===================
|
||||
This guide covers upgrading ScyllaDB from version **2021.1.8** or later to ScyllaDB Enterprise version 2021.1.y, on the following platforms:
|
||||
This guide covers upgrading ScyllaDB from version **2021.1.8** or later to ScyllaDB Enterprise version 2022.1.y, on the following platforms:
|
||||
|
||||
* Red Hat Enterprise Linux, version 7 and later
|
||||
* CentOS, version 7 and later
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
.. |OS| replace:: 18.04
|
||||
.. |ROLLBACK| replace:: rollback
|
||||
.. _ROLLBACK: /upgrade/upgrade-enterprise/upgrade-guide-from-2021.1-to-2022.1/upgrade-guide-from-2021.1-to-2022.1-ubuntu-18-04/#rollback-procedure
|
||||
.. |APT| replace:: ScyllaDB Enterprise Deb repo
|
||||
.. _APT: https://www.scylladb.com/customer-portal/?product=ent&platform=ubuntu-18.04&version=stable-release-2022.1
|
||||
.. |OPENJDK| replace:: openjdk-8-jre-headless
|
||||
.. include:: /upgrade/_common/upgrade-guide-from-2021.1-to-2022.1-ubuntu-and-debian.rst
|
||||
@@ -1,7 +0,0 @@
|
||||
.. |OS| replace:: 20.04
|
||||
.. |ROLLBACK| replace:: rollback
|
||||
.. _ROLLBACK: /upgrade/upgrade-enterprise/upgrade-guide-from-2021.1-to-2022.1/upgrade-guide-from-2021.1-to-2022.1-ubuntu-18-04/#rollback-procedure
|
||||
.. |APT| replace:: ScyllaDB Enterprise Deb repo
|
||||
.. _APT: https://www.scylladb.com/customer-portal/?product=ent&platform=ubuntu-20.04&version=stable-release-2022.1
|
||||
.. |OPENJDK| replace:: openjdk-8-jre-headless
|
||||
.. include:: /upgrade/_common/upgrade-guide-from-2021.1-to-2022.1-ubuntu-and-debian.rst
|
||||
@@ -0,0 +1,13 @@
|
||||
.. |OS| replace:: Ubuntu
|
||||
.. |ROLLBACK| replace:: rollback
|
||||
.. _ROLLBACK: /upgrade/upgrade-enterprise/upgrade-guide-from-2021.1-to-2022.1/upgrade-guide-from-2021.1-to-2022.1-ubuntu/#rollback-procedure
|
||||
.. |SRC_VERSION| replace:: 2021.1
|
||||
.. |NEW_VERSION| replace:: 2022.1
|
||||
.. |SCYLLA_NAME| replace:: ScyllaDB Enterprise
|
||||
.. |PKG_NAME| replace:: scylla
|
||||
.. |APT| replace:: ScyllaDB Enterprise Deb repo
|
||||
.. _APT: https://www.scylladb.com/customer-portal/?product=ent&platform=ubuntu-20.04&version=stable-release-2022.1
|
||||
.. |SCYLLA_REPO| replace:: ScyllaDB Enterprise Deb repo
|
||||
.. _SCYLLA_REPO: https://www.scylladb.com/customer-portal/?product=ent&platform=ubuntu-20.04&version=stable-release-2022.1
|
||||
.. |OPENJDK| replace:: openjdk-8-jre-headless
|
||||
.. include:: /upgrade/_common/upgrade-guide-v2022-ubuntu-and-debian.rst
|
||||
@@ -6,6 +6,7 @@ Upgrade ScyllaDB Enterprise 2022
|
||||
:titlesonly:
|
||||
:hidden:
|
||||
|
||||
ScyllaDB Enterprise Image <upgrade-guide-from-2022.x.y-to-2022.x.z-image>
|
||||
Red Hat Enterprise Linux and CentOS <upgrade-guide-from-2022.x.y-to-2022.x.z-rpm>
|
||||
Ubuntu 18.04 <upgrade-guide-from-2022.x.y-to-2022.x.z-ubuntu-18-04>
|
||||
Ubuntu 20.04 <upgrade-guide-from-2022.x.y-to-2022.x.z-ubuntu-20-04>
|
||||
@@ -23,6 +24,7 @@ Upgrade ScyllaDB Enterprise 2022
|
||||
|
||||
Upgrade guides are available for:
|
||||
|
||||
* :doc:`Upgrade ScyllaDB Image from 2022.x.y to 2022.x.z<upgrade-guide-from-2022.x.y-to-2022.x.z-image>`
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 2022.x.y to 2022.x.z on Red Hat Enterprise Linux and CentOS <upgrade-guide-from-2022.x.y-to-2022.x.z-rpm>`
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 2022.x.y to 2022.x.z on Ubuntu 18.04 <upgrade-guide-from-2022.x.y-to-2022.x.z-ubuntu-18-04>`
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 2022.x.y to 2022.x.z on Ubuntu 20.04 <upgrade-guide-from-2022.x.y-to-2022.x.z-ubuntu-20-04>`
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
.. |OS| replace:: EC2, GCP, and Azure
|
||||
.. |ROLLBACK| replace:: rollback
|
||||
.. _ROLLBACK: ./#rollback-procedure
|
||||
.. |SRC_VERSION| replace:: 2022.x.y
|
||||
.. |NEW_VERSION| replace:: 2022.x.z
|
||||
.. |FROM| replace:: 2022.x.y
|
||||
.. |TO| replace:: 2022.x.z
|
||||
.. |SCYLLA_NAME| replace:: ScyllaDB Enterprise Image
|
||||
.. |PKG_NAME| replace:: scylla
|
||||
.. |SCYLLA_REPO| replace:: ScyllaDB Enterprise deb repo
|
||||
.. _SCYLLA_REPO: https://www.scylladb.com/customer-portal/?product=ent&platform=ubuntu-20.04&version=stable-release-2022.1
|
||||
.. |APT| replace:: ScyllaDB deb repo
|
||||
.. _APT: https://www.scylladb.com/customer-portal/?product=ent&platform=ubuntu-20.04&version=stable-release-2022.1
|
||||
.. include:: /upgrade/_common/upgrade-guide-v2022-patch-ubuntu-and-debian-p1.rst
|
||||
.. include:: /upgrade/_common/upgrade-image-enterprise.rst
|
||||
.. include:: /upgrade/_common/upgrade-guide-v2022-patch-ubuntu-and-debian-p2.rst
|
||||
@@ -5,6 +5,7 @@ Upgrade ScyllaDB Open Source
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
ScyllaDB 5.0 to 5.1 <upgrade-guide-from-5.0-to-5.1/index>
|
||||
ScyllaDB 5.x maintenance release <upgrade-guide-from-5.x.y-to-5.x.z/index>
|
||||
ScyllaDB 4.6 to 5.0 <upgrade-guide-from-4.6-to-5.0/index>
|
||||
ScyllaDb 4.5 to 4.6 <upgrade-guide-from-4.5-to-4.6/index>
|
||||
@@ -35,6 +36,7 @@ Upgrade ScyllaDB Open Source
|
||||
|
||||
Procedures for upgrading to a newer version of ScyllaDB Open Source.
|
||||
|
||||
* :doc:`Upgrade Guide - ScyllaDB 5.0 to 5.1 <upgrade-guide-from-5.0-to-5.1/index>`
|
||||
* :doc:`Upgrade Guide - ScyllaDB 5.x maintenance releases <upgrade-guide-from-5.x.y-to-5.x.z/index>`
|
||||
* :doc:`Upgrade Guide - ScyllaDB 4.6 to 5.0 <upgrade-guide-from-4.6-to-5.0/index>`
|
||||
* :doc:`Upgrade Guide - ScyllaDB 4.5 to 4.6 <upgrade-guide-from-4.5-to-4.6/index>`
|
||||
|
||||
@@ -10,5 +10,5 @@
|
||||
.. |SCYLLA_METRICS| replace:: Scylla Metrics Update - Scylla 4.6 to 5.0
|
||||
.. _SCYLLA_METRICS: ../metric-update-4.6-to-5.0
|
||||
.. include:: /upgrade/_common/upgrade-guide-v5-ubuntu-and-debian-p1.rst
|
||||
.. include:: /upgrade/_common/upgrade-image.rst
|
||||
.. include:: /upgrade/_common/upgrade-image-opensource.rst
|
||||
.. include:: /upgrade/_common/upgrade-guide-v5-ubuntu-and-debian-p2.rst
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
====================================
|
||||
Upgrade Guide - ScyllaDB 5.0 to 5.1
|
||||
====================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:hidden:
|
||||
|
||||
ScyllaDB <upgrade-guide-from-5.0-to-5.1-generic>
|
||||
Metrics <metric-update-5.0-to-5.1>
|
||||
|
||||
.. panel-box::
|
||||
:title: Upgrade Scylla
|
||||
:id: "getting-started"
|
||||
:class: my-panel
|
||||
|
||||
|
||||
Upgrade guides are available for:
|
||||
|
||||
* :doc:`Upgrade ScyllaDB from 5.0.x to 5.1.y <upgrade-guide-from-5.0-to-5.1-generic>`
|
||||
* :doc:`ScyllaDB Metrics Update - Scylla 5.0 to 5.1 <metric-update-5.0-to-5.1>`
|
||||
@@ -0,0 +1,122 @@
|
||||
Scylla Metric Update - Scylla 5.0 to 5.1
|
||||
========================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:hidden:
|
||||
|
||||
Scylla 5.1 Dashboards are available as part of the latest |mon_root|.
|
||||
|
||||
The following metrics are new in Scylla 5.1
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. list-table::
|
||||
:widths: 25 150
|
||||
:header-rows: 1
|
||||
|
||||
* - Metric
|
||||
- Description
|
||||
* - scylla_cache_rows_compacted_with_tombstones
|
||||
- Number of rows dropped in the cache by a tombstone write
|
||||
* - scylla_cache_rows_dropped_by_tombstones
|
||||
- Total number of rows in memtables that were dropped during a cache update on memtable flush
|
||||
* - scylla_commitlog_active_allocations
|
||||
- Current number of active allocations
|
||||
* - scylla_commitlog_blocked_on_new_segment
|
||||
- Number of allocations blocked on acquiring a new segment
|
||||
* - scylla_commitlog_bytes_flush_requested
|
||||
- Number of bytes requested to be flushed (persisted)
|
||||
* - scylla_commitlog_bytes_released
|
||||
- Number of bytes released from disk (deleted/recycled
|
||||
* - scylla_compaction_manager_completed_compactions
|
||||
- Number of completed compaction tasks
|
||||
* - scylla_compaction_manager_failed_compactions
|
||||
- Number of failed compaction tasks
|
||||
* - scylla_compaction_manager_normalized_backlog
|
||||
- Sum of normalized compaction backlog for all tables in the system. Backlog is normalized by dividing backlog by the shard's available memory.
|
||||
* - scylla_compaction_manager_postponed_compactions
|
||||
- Number of tables with postponed compaction
|
||||
* - scylla_compaction_manager_validation_errors
|
||||
- Number of encountered validation errors
|
||||
* - scylla_cql_select_parallelized
|
||||
- Number of parallelized aggregation SELECT query executions
|
||||
* - scylla_database_total_reads_rate_limited
|
||||
- Number of read operations that were rejected on the replica side because the per-partition limit was reached
|
||||
* - scylla_database_total_writes_rate_limited
|
||||
- Number of write operations that were rejected on the replica side because the per-partition limit was reached
|
||||
* - scylla_forward_service_requests_dispatched_to_other_nodes
|
||||
- Number of forward requests that were dispatched to other nodes
|
||||
* - scylla_forward_service_requests_dispatched_to_own_shards
|
||||
- Number of forward requests that were dispatched to local shards
|
||||
* - scylla_forward_service_requests_executed
|
||||
- Number of forward requests that were executed
|
||||
* - scylla_gossip_live
|
||||
- Number of live nodes the current node sees
|
||||
* - scylla_gossip_unreachable
|
||||
- Number of unreachable nodes the current node sees
|
||||
* - scylla_io_queue_adjusted_consumption
|
||||
- Consumed disk capacity units adjusted for class shares and idling preemption
|
||||
* - scylla_io_queue_consumption
|
||||
- Accumulated disk capacity units consumed by this class; an increment per-second rate indicates full utilization
|
||||
* - scylla_io_queue_total_split_bytes
|
||||
- Total number of bytes split
|
||||
* - scylla_io_queue_total_split_ops
|
||||
- Total number of requests split
|
||||
* - scylla_per_partition_rate_limiter_allocations
|
||||
- Number of times an entry was allocated over an empty/expired entry
|
||||
* - scylla_per_partition_rate_limiter_failed_allocations
|
||||
- Number of times the rate limiter gave up trying to allocate
|
||||
* - scylla_per_partition_rate_limiter_load_factor
|
||||
- Current load factor of the hash table (upper bound, may be overestimated)
|
||||
* - scylla_per_partition_rate_limiter_probe_count
|
||||
- Number of probes made during lookups
|
||||
* - scylla_per_partition_rate_limiter_successful_lookups
|
||||
- Number of times a lookup returned an already allocated entry
|
||||
* - scylla_reactor_aio_outsizes
|
||||
- Total number of AIO operations that exceed IO limit
|
||||
* - scylla_schema_commitlog_active_allocations
|
||||
- Current number of active allocations
|
||||
* - scylla_schema_commitlog_alloc
|
||||
- Number of not closed segments that still have some free space. This value should not get too high.
|
||||
* - scylla_schema_commitlog_allocating_segments
|
||||
- Number of times a new mutation has been added to a segment. Divide bytes_written by this value to get the average number of bytes per mutation written to the disk.
|
||||
* - scylla_schema_commitlog_blocked_on_new_segment
|
||||
- Number of allocations blocked on acquiring a new segment
|
||||
* - scylla_schema_commitlog_bytes_flush_requested
|
||||
- Number of bytes requested to be flushed (persisted)
|
||||
* - scylla_schema_commitlog_bytes_released
|
||||
- Number of bytes released from disk (deleted/recycled)
|
||||
* - scylla_schema_commitlog_bytes_written
|
||||
- Number of bytes written to disk. Divide this value by "alloc" to get the average number of bytes per mutation written to the disk.
|
||||
* - scylla_schema_commitlog_cycle
|
||||
- Number of commitlog write cycles - when the data is written from the internal memory buffer to the disk
|
||||
* - scylla_schema_commitlog_disk_active_bytes
|
||||
- Size of disk space in bytes used for data so far. A too high value indicates that there is a bottleneck in writing to SStable paths.
|
||||
* - scylla_schema_commitlog_disk_slack_end_bytes
|
||||
- Size of disk space (in bytes) unused because of segment switching (end slack). A too high value indicates that not enough data is written to each segment.
|
||||
* - scylla_schema_commitlog_disk_total_bytes
|
||||
- Size of disk space (in bytes) reserved for data so far. A too high value indicates that there is a bottleneck in writing to SStable paths.
|
||||
* - scylla_schema_commitlog_flush
|
||||
- Number of times the flush() method was called for a file
|
||||
* - scylla_schema_commitlog_flush_limit_exceeded
|
||||
- Number of times a flush limit was exceeded. A non-zero value indicates that there are too many pending flush operations (see pending_flushes), and some of them will be blocked till the total amount of pending flush operations drops below 5.
|
||||
* - scylla_schema_commitlog_memory_buffer_bytes
|
||||
- Total number of bytes in internal memory buffers
|
||||
* - scylla_schema_commitlog_pending_allocations
|
||||
- Number of currently pending allocations. A non-zero value indicates that there is a bottleneck in the disk write flow.
|
||||
* - scylla_schema_commitlog_pending_flushes
|
||||
- Number of currently pending flushes. See the related ``flush_limit_exceeded`` metric.
|
||||
* - scylla_schema_commitlog_requests_blocked_memory
|
||||
- Number of requests blocked due to memory pressure. A non-zero value indicates that the commitlog memory quota is not enough to serve the required amount of requests.
|
||||
* - scylla_schema_commitlog_segments
|
||||
- Current number of segments
|
||||
* - scylla_schema_commitlog_slack
|
||||
- Number of unused bytes written to the disk due to disk segment alignment
|
||||
* - scylla_schema_commitlog_unused_segments
|
||||
- Current number of unused segments. A non-zero value indicates that the disk write path became temporarily slow.
|
||||
* - scylla_sstables_pi_auto_scale_events
|
||||
- Number of promoted index auto-scaling events
|
||||
* - scylla_storage_proxy_coordinator_read_rate_limited
|
||||
- Number of read requests that were rejected by replicas because the rate limit for the partition was reached
|
||||
* - scylla_storage_proxy_coordinator_write_rate_limited
|
||||
- Number of write requests that were rejected by replicas because the rate limit for the partition was reached
|
||||
@@ -0,0 +1,359 @@
|
||||
.. |SCYLLA_NAME| replace:: ScyllaDB
|
||||
|
||||
.. |SRC_VERSION| replace:: 5.0
|
||||
.. |NEW_VERSION| replace:: 5.1
|
||||
|
||||
.. |DEBIAN_SRC_REPO| replace:: Debian
|
||||
.. _DEBIAN_SRC_REPO: https://www.scylladb.com/download/?platform=debian-10&version=scylla-5.0
|
||||
|
||||
.. |UBUNTU_SRC_REPO| replace:: Ubuntu
|
||||
.. _UBUNTU_SRC_REPO: https://www.scylladb.com/download/?platform=ubuntu-20.04&version=scylla-5.0
|
||||
|
||||
.. |SCYLLA_DEB_SRC_REPO| replace:: ScyllaDB deb repo (|DEBIAN_SRC_REPO|_, |UBUNTU_SRC_REPO|_)
|
||||
|
||||
.. |SCYLLA_RPM_SRC_REPO| replace:: ScyllaDB rpm repo
|
||||
.. _SCYLLA_RPM_SRC_REPO: https://www.scylladb.com/download/?platform=centos&version=scylla-5.0
|
||||
|
||||
.. |DEBIAN_NEW_REPO| replace:: Debian
|
||||
.. _DEBIAN_NEW_REPO: https://www.scylladb.com/download/?platform=debian-10&version=scylla-5.1
|
||||
|
||||
.. |UBUNTU_NEW_REPO| replace:: Ubuntu
|
||||
.. _UBUNTU_NEW_REPO: https://www.scylladb.com/download/?platform=ubuntu-20.04&version=scylla-5.1
|
||||
|
||||
.. |SCYLLA_DEB_NEW_REPO| replace:: ScyllaDB deb repo (|DEBIAN_NEW_REPO|_, |UBUNTU_NEW_REPO|_)
|
||||
|
||||
.. |SCYLLA_RPM_NEW_REPO| replace:: ScyllaDB rpm repo
|
||||
.. _SCYLLA_RPM_NEW_REPO: https://www.scylladb.com/download/?platform=centos&version=scylla-5.1
|
||||
|
||||
.. |ROLLBACK| replace:: rollback
|
||||
.. _ROLLBACK: ./#rollback-procedure
|
||||
|
||||
.. |SCYLLA_METRICS| replace:: Scylla Metrics Update - Scylla 5.0 to 5.1
|
||||
.. _SCYLLA_METRICS: ../metric-update-5.0-to-5.1
|
||||
|
||||
=============================================================================
|
||||
Upgrade Guide - |SCYLLA_NAME| |SRC_VERSION| to |NEW_VERSION|
|
||||
=============================================================================
|
||||
|
||||
This document is a step by step procedure for upgrading from |SCYLLA_NAME| |SRC_VERSION| to |SCYLLA_NAME| |NEW_VERSION|, and rollback to version |SRC_VERSION| if required.
|
||||
|
||||
This guide covers upgrading Scylla on Red Hat Enterprise Linux (RHEL) 7/8, CentOS 7/8, Debian 10 and Ubuntu 20.04. It also applies when using ScyllaDB official image on EC2, GCP, or Azure; the image is based on Ubuntu 20.04.
|
||||
|
||||
See :doc:`OS Support by Platform and Version </getting-started/os-support>` for information about supported versions.
|
||||
|
||||
Upgrade Procedure
|
||||
=================
|
||||
|
||||
A ScyllaDB upgrade is a rolling procedure which does **not** require full cluster shutdown.
|
||||
For each of the nodes in the cluster, serially (i.e. one node at a time), you will:
|
||||
|
||||
* Check that the cluster's schema is synchronized
|
||||
* Drain the node and backup the data
|
||||
* Backup the configuration file
|
||||
* Stop ScyllaDB
|
||||
* Download and install new ScyllaDB packages
|
||||
* Start ScyllaDB
|
||||
* Validate that the upgrade was successful
|
||||
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating that the node you upgraded is up and running the new version.
|
||||
|
||||
**During** the rolling upgrade, it is highly recommended:
|
||||
|
||||
* Not to use the new |NEW_VERSION| features
|
||||
* Not to run administration functions, like repairs, refresh, rebuild or add or remove nodes. See `sctool <https://manager.docs.scylladb.com/stable/sctool/>`_ for suspending ScyllaDB Manager (only available for ScyllaDB Enterprise) scheduled or running repairs.
|
||||
* Not to apply schema changes
|
||||
|
||||
.. note:: Before upgrading, make sure to use the latest `ScyllaDB Monitoring <https://monitoring.docs.scylladb.com/>`_ stack.
|
||||
|
||||
Upgrade Steps
|
||||
=============
|
||||
Check the cluster schema
|
||||
-------------------------
|
||||
Make sure that all nodes have the schema synchronized before upgrade. The upgrade procedure will fail if there is a schema disagreement between nodes.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
nodetool describecluster
|
||||
|
||||
Drain the nodes and backup the data
|
||||
-----------------------------------
|
||||
Before any major procedure, like an upgrade, it is recommended to backup all the data to an external device. In Scylla, backup is done using the ``nodetool snapshot`` command. For **each** node in the cluster, run the following command:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
nodetool drain
|
||||
nodetool snapshot
|
||||
|
||||
Take note of the directory name that nodetool gives you, and copy all the directories having that name under ``/var/lib/scylla`` to a backup device.
|
||||
|
||||
When the upgrade is completed on all nodes, remove the snapshot with the ``nodetool clearsnapshot -t <snapshot>`` command to prevent running out of space.
|
||||
|
||||
Backup the configuration file
|
||||
------------------------------
|
||||
.. code:: sh
|
||||
|
||||
sudo cp -a /etc/scylla/scylla.yaml /etc/scylla/scylla.yaml.backup-src
|
||||
|
||||
Gracefully stop the node
|
||||
------------------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service scylla-server stop
|
||||
|
||||
Download and install the new release
|
||||
------------------------------------
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: Debian/Ubuntu
|
||||
|
||||
Before upgrading, check what version you are running now using ``dpkg -s scylla-server``. You should use the same version as this version in case you want to |ROLLBACK|_ the upgrade. If you are not running a |SRC_VERSION|.x version, stop right here! This guide only covers |SRC_VERSION|.x to |NEW_VERSION|.y upgrades.
|
||||
|
||||
**To upgrade ScyllaDB:**
|
||||
|
||||
#. Update the |SCYLLA_DEB_NEW_REPO| to |NEW_VERSION|.
|
||||
|
||||
#. Install the new ScyllaDB version:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo apt-get clean all
|
||||
sudo apt-get update
|
||||
sudo apt-get dist-upgrade scylla
|
||||
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
.. group-tab:: RHEL/CentOS
|
||||
|
||||
Before upgrading, check what version you are running now using ``rpm -qa | grep scylla-server``. You should use the same version as this version in case you want to |ROLLBACK|_ the upgrade. If you are not running a |SRC_VERSION|.x version, stop right here! This guide only covers |SRC_VERSION|.x to |NEW_VERSION|.y upgrades.
|
||||
|
||||
**To upgrade ScyllaDB:**
|
||||
|
||||
#. Update the |SCYLLA_RPM_NEW_REPO|_ to |NEW_VERSION|.
|
||||
#. Install the new ScyllaDB version:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo yum clean all
|
||||
sudo yum update scylla\* -y
|
||||
|
||||
.. group-tab:: EC2/GCP/Azure Ubuntu Image
|
||||
|
||||
Before upgrading, check what version you are running now using ``dpkg -s scylla-server``. You should use the same version as this version in case you want to |ROLLBACK|_ the upgrade. If you are not running a |SRC_VERSION|.x version, stop right here! This guide only covers |SRC_VERSION|.x to |NEW_VERSION|.y upgrades.
|
||||
|
||||
There are two alternative upgrade procedures:
|
||||
|
||||
* :ref:`Upgrading ScyllaDB and simultaneously updating 3rd party and OS packages <upgrade-image-recommended-procedure>`. It is recommended if you are running a ScyllaDB official image (EC2 AMI, GCP, and Azure images), which is based on Ubuntu 20.04.
|
||||
|
||||
* :ref:`Upgrading ScyllaDB without updating any external packages <upgrade-image-upgrade-guide-regular-procedure>`.
|
||||
|
||||
.. _upgrade-image-recommended-procedure:
|
||||
|
||||
**To upgrade ScyllaDB and update 3rd party and OS packages (RECOMMENDED):**
|
||||
|
||||
Choosing this upgrade procedure allows you to upgrade your ScyllaDB version and update the 3rd party and OS packages using one command.
|
||||
|
||||
#. Update the |SCYLLA_DEB_NEW_REPO| to |NEW_VERSION|.
|
||||
|
||||
#. Load the new repo:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
|
||||
#. Run the following command to update the manifest file:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
cat scylla-packages-<version>-<arch>.txt | sudo xargs -n1 apt-get install -y
|
||||
|
||||
Where:
|
||||
|
||||
* ``<version>`` - The ScyllaDB version to which you are upgrading ( |NEW_VERSION| ).
|
||||
* ``<arch>`` - Architecture type: ``x86_64`` or ``aarch64``.
|
||||
|
||||
The file is included in the ScyllaDB packages downloaded in the previous step. The file location is ``http://downloads.scylladb.com/downloads/scylla/aws/manifest/scylla-packages-<version>-<arch>.txt``
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: sh
|
||||
|
||||
cat scylla-packages-5.1.2-x86_64.txt | sudo xargs -n1 apt-get install -y
|
||||
|
||||
.. note::
|
||||
|
||||
Alternatively, you can update the manifest file with the following command:
|
||||
|
||||
``sudo apt-get install $(awk '{print $1'} scylla-packages-<version>-<arch>.txt) -y``
|
||||
|
||||
.. _upgrade-image-upgrade-guide-regular-procedure:
|
||||
|
||||
**To upgrade ScyllaDB:**
|
||||
|
||||
#. Update the |SCYLLA_DEB_NEW_REPO| to |NEW_VERSION|.
|
||||
|
||||
#. Install the new ScyllaDB version:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo apt-get clean all
|
||||
sudo apt-get update
|
||||
sudo apt-get dist-upgrade scylla
|
||||
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
|
||||
Start the node
|
||||
--------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service scylla-server start
|
||||
|
||||
Validate
|
||||
--------
|
||||
#. Check cluster status with ``nodetool status`` and make sure **all** nodes, including the one you just upgraded, are in ``UN`` status.
|
||||
#. Use ``curl -X GET "http://localhost:10000/storage_service/scylla_release_version"`` to check the ScyllaDB version. Validate that the version matches the one you upgraded to.
|
||||
#. Check scylla-server log (by ``journalctl _COMM=scylla``) and ``/var/log/syslog`` to validate there are no new errors in the log.
|
||||
#. Check again after two minutes, to validate no new issues are introduced.
|
||||
|
||||
Once you are sure the node upgrade was successful, move to the next node in the cluster.
|
||||
|
||||
See |Scylla_METRICS|_ for more information..
|
||||
|
||||
Rollback Procedure
|
||||
==================
|
||||
|
||||
.. include:: /upgrade/_common/warning_rollback.rst
|
||||
|
||||
The following procedure describes a rollback from |SCYLLA_NAME| |NEW_VERSION|.x to |SRC_VERSION|.y. Apply this procedure if an upgrade from |SRC_VERSION| to |NEW_VERSION| failed before completing on all nodes. Use this procedure only for nodes you upgraded to |NEW_VERSION|.
|
||||
|
||||
ScyllaDB rollback is a rolling procedure which does **not** require full cluster shutdown.
|
||||
For each of the nodes you rollback to |SRC_VERSION|, serially (i.e. one node at a time), you will:
|
||||
|
||||
* Drain the node and stop Scylla
|
||||
* Retrieve the old ScyllaDB packages
|
||||
* Restore the configuration file
|
||||
* Restore system tables
|
||||
* Reload systemd configuration
|
||||
* Restart ScyllaDB
|
||||
* Validate the rollback success
|
||||
|
||||
Apply the following procedure **serially** on each node. Do not move to the next node before validating that the rollback was successful and the node is up and running the old version.
|
||||
|
||||
Rollback Steps
|
||||
==============
|
||||
Drain and gracefully stop the node
|
||||
----------------------------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
nodetool drain
|
||||
sudo service scylla-server stop
|
||||
|
||||
Download and install the old release
|
||||
------------------------------------
|
||||
|
||||
..
|
||||
TODO: downgrade for 3rd party packages in EC2/GCP/Azure - like in the upgrade section?
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: Debian/Ubuntu
|
||||
|
||||
#. Remove the old repo file.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo rm -rf /etc/apt/sources.list.d/scylla.list
|
||||
|
||||
#. Update the |SCYLLA_DEB_SRC_REPO| to |SRC_VERSION|.
|
||||
#. Install:
|
||||
|
||||
.. code-block::
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get remove scylla\* -y
|
||||
sudo apt-get install scylla
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
.. group-tab:: RHEL/CentOS
|
||||
|
||||
#. Remove the old repo file.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo rm -rf /etc/yum.repos.d/scylla.repo
|
||||
|
||||
#. Update the |SCYLLA_RPM_SRC_REPO|_ to |SRC_VERSION|.
|
||||
#. Install:
|
||||
|
||||
.. code:: console
|
||||
|
||||
sudo yum clean all
|
||||
sudo rm -rf /var/cache/yum
|
||||
sudo yum remove scylla\\*tools-core
|
||||
sudo yum downgrade scylla\\* -y
|
||||
sudo yum install scylla
|
||||
|
||||
.. group-tab:: EC2/GCP/Azure Ubuntu Image
|
||||
|
||||
#. Remove the old repo file.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo rm -rf /etc/apt/sources.list.d/scylla.list
|
||||
|
||||
#. Update the |SCYLLA_DEB_SRC_REPO| to |SRC_VERSION|.
|
||||
#. Install:
|
||||
|
||||
.. code-block::
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get remove scylla\* -y
|
||||
sudo apt-get install scylla
|
||||
|
||||
Answer ‘y’ to the first two questions.
|
||||
|
||||
Restore the configuration file
|
||||
------------------------------
|
||||
.. code:: sh
|
||||
|
||||
sudo rm -rf /etc/scylla/scylla.yaml
|
||||
sudo cp -a /etc/scylla/scylla.yaml.backup-src | /etc/scylla/scylla.yaml
|
||||
|
||||
Restore system tables
|
||||
---------------------
|
||||
|
||||
Restore all tables of **system** and **system_schema** from the previous snapshot because |NEW_VERSION| uses a different set of system tables. See :doc:`Restore from a Backup and Incremental Backup </operating-scylla/procedures/backup-restore/restore/>` for reference.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
cd /var/lib/scylla/data/keyspace_name/table_name-UUID/snapshots/<snapshot_name>/
|
||||
sudo cp -r * /var/lib/scylla/data/keyspace_name/table_name-UUID/
|
||||
sudo chown -R scylla:scylla /var/lib/scylla/data/keyspace_name/table_name-UUID/
|
||||
|
||||
Reload systemd configuration
|
||||
----------------------------
|
||||
|
||||
You must reload the unit file if the systemd unit file is changed.
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
Start the node
|
||||
--------------
|
||||
|
||||
.. code:: sh
|
||||
|
||||
sudo service scylla-server start
|
||||
|
||||
Validate
|
||||
--------
|
||||
Check the upgrade instructions above for validation. Once you are sure the node rollback is successful, move to the next node in the cluster.
|
||||
@@ -6,6 +6,7 @@ Upgrade Guide - ScyllaDB 5.x Maintenance Release
|
||||
:maxdepth: 2
|
||||
:hidden:
|
||||
|
||||
ScyllaDB Image <upgrade-guide-from-5.x.y-to-5.x.z-image>
|
||||
Red Hat Enterprise Linux and CentOS <upgrade-guide-from-5.x.y-to-5.x.z-rpm>
|
||||
Ubuntu <upgrade-guide-from-5.x.y-to-5.x.z-ubuntu>
|
||||
Debian <upgrade-guide-from-5.x.y-to-5.x.z-debian>
|
||||
@@ -18,6 +19,7 @@ Upgrade Guide - ScyllaDB 5.x Maintenance Release
|
||||
|
||||
Upgrade guides are available for:
|
||||
|
||||
* :doc:`Upgrade ScyllaDB Image from 5.x.y to 5.x.z <upgrade-guide-from-5.x.y-to-5.x.z-image>`
|
||||
* :doc:`Upgrade ScyllaDB from 5.x.y to 5.x.z on Red Hat Enterprise Linux and CentOS <upgrade-guide-from-5.x.y-to-5.x.z-rpm>`
|
||||
* :doc:`Upgrade ScyllaDB from 5.x.y to 5.x.z on Ubuntu <upgrade-guide-from-5.x.y-to-5.x.z-ubuntu>`
|
||||
* :doc:`Upgrade ScyllaDB from 5.x.y to 5.x.z on Debian <upgrade-guide-from-5.x.y-to-5.x.z-debian>`
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
.. |OS| replace:: EC2, GCP, and Azure
|
||||
.. |ROLLBACK| replace:: rollback
|
||||
.. _ROLLBACK: ./#rollback-procedure
|
||||
.. |SRC_VERSION| replace:: 5.x.y
|
||||
.. |NEW_VERSION| replace:: 5.x.z
|
||||
.. |FROM| replace:: 5.x.y
|
||||
.. |TO| replace:: 5.x.z
|
||||
.. |SCYLLA_NAME| replace:: ScyllaDB Image
|
||||
.. |PKG_NAME| replace:: scylla
|
||||
.. |SCYLLA_REPO| replace:: ScyllaDB deb repo
|
||||
.. _SCYLLA_REPO: https://www.scylladb.com/download/?platform=ubuntu-20.04&version=scylla-5.0
|
||||
.. |APT| replace:: ScyllaDB deb repo
|
||||
.. _APT: http://www.scylladb.com/download/
|
||||
.. include:: /upgrade/_common/upgrade-guide-v5-patch-ubuntu-and-debian-p1.rst
|
||||
.. include:: /upgrade/_common/upgrade-image-opensource.rst
|
||||
.. include:: /upgrade/_common/upgrade-guide-v5-patch-ubuntu-and-debian-p2.rst
|
||||
@@ -7,8 +7,7 @@ Upgrade - ScyllaDB 5.0 to ScyllaDB Enterprise 2022.1
|
||||
:hidden:
|
||||
|
||||
Red Hat Enterprise Linux and CentOS <upgrade-guide-from-5.0-to-2022.1-rpm>
|
||||
Ubuntu 18.04 <upgrade-guide-from-5.0-to-2022.1-ubuntu-18-04>
|
||||
Ubuntu 20.04 <upgrade-guide-from-5.0-to-2022.1-ubuntu-20-04>
|
||||
Ubuntu <upgrade-guide-from-5.0-to-2022.1-ubuntu>
|
||||
Debian 10 <upgrade-guide-from-5.0-to-2022.1-debian-10>
|
||||
Metrics <metric-update-5.0-to-2022.1>
|
||||
|
||||
@@ -26,8 +25,7 @@ Upgrade - ScyllaDB 5.0 to ScyllaDB Enterprise 2022.1
|
||||
Upgrade guides are available for:
|
||||
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 5.0.x to 2022.1.y on Red Hat Enterprise Linux and CentOS <upgrade-guide-from-5.0-to-2022.1-rpm>`
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 5.0.x to 2022.1.y on Ubuntu 18.04 <upgrade-guide-from-5.0-to-2022.1-ubuntu-18-04>`
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 5.0.x to 2022.1.y on Ubuntu 20.04 <upgrade-guide-from-5.0-to-2022.1-ubuntu-20-04>`
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 5.0.x to 2022.1.y on Ubuntu <upgrade-guide-from-5.0-to-2022.1-ubuntu>`
|
||||
* :doc:`Upgrade ScyllaDB Enterprise from 5.0.x to 2022.1.y on Debian 10 <upgrade-guide-from-5.0-to-2022.1-debian-10>`
|
||||
* :doc:`ScyllaDB Metrics Update - ScyllaDB 5.0 to 2022.1 <metric-update-5.0-to-2022.1>`
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ Apply the following procedure **serially** on each node. Do not move to the next
|
||||
**During** the rolling upgrade, it is highly recommended:
|
||||
|
||||
* Not to use new 2022.1 features.
|
||||
* Not to run administration functions, like repairs, refresh, rebuild or add or remove nodes. See :doc:`here </operating-scylla/manager/2.1/sctool>` for suspending Scylla Manager scheduled or running repairs.
|
||||
* Not to run administration functions, like repairs, refresh, rebuild or add or remove nodes. See `sctool <https://manager.docs.scylladb.com/stable/sctool/>`_ for suspending Scylla Manager scheduled or running repairs.
|
||||
* Not to apply schema changes.
|
||||
|
||||
Upgrade Steps
|
||||
@@ -93,6 +93,11 @@ To upgrade:
|
||||
If you use a cloud image with a preinstalled version of ScyllaDB (for example, AMI), you need to install an additional
|
||||
package ``scylla-enterprise-machine-image`` with the ``sudo yum install scylla-enterprise-machine-image`` command.
|
||||
|
||||
CentOS only:
|
||||
|
||||
If you use a cloud image with a preinstalled version of ScyllaDB (for example, AMI), you need to install an additional
|
||||
package ``scylla-enterprise-machine-image`` with the ``sudo yum install scylla-enterprise-machine-image`` command.
|
||||
|
||||
Start the node
|
||||
--------------
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
.. |OS| replace:: Ubuntu
|
||||
.. |ROLLBACK| replace:: rollback
|
||||
.. _ROLLBACK: /upgrade/upgrade-to-enterprise/upgrade-guide-from-5.0-to-2022.1/upgrade-guide-from-5.0-to-2022.1-ubuntu/#rollback-procedure
|
||||
.. |APT| replace:: ScyllaDB deb repo
|
||||
.. _APT: http://www.scylladb.com/download/
|
||||
.. |APT_ENTERPRISE| replace:: Scylla Enterprise Deb repo
|
||||
.. _APT_ENTERPRISE: https://www.scylladb.com/customer-portal/?product=ent&platform=ubuntu-20.04&version=stable-release-2022.1
|
||||
.. include:: /upgrade/_common/upgrade-guide-from-5.0-to-2022.1-ubuntu-and-debian.rst
|
||||
@@ -25,8 +25,8 @@ Scylla Open Source Features
|
||||
the implementation of Raft, schema changes in ScyllaDB are safe, including concurrent schema updates.
|
||||
This feature is experimental in version 5.0 and needs to be explicitly enabled.
|
||||
|
||||
* :doc:`scylla-sstable tool </operating-scylla/admin-tools/scylla-sstable/>` - An admin tool that allows you to examine the content of SStables by performing operations such as dumping the content of SStables, generating a histogram, validating the content of SStables, and more.
|
||||
* :doc:`scylla-types tool </operating-scylla/admin-tools/scylla-types/>` - An admin tool that allows you to examine raw values obtained from SStables, logs, coredumps, etc., by printing, validating or comparing the values.
|
||||
* :doc:`Scylla SStable tool </operating-scylla/admin-tools/scylla-sstable/>` - An admin tool that allows you to examine the content of SStables by performing operations such as dumping the content of SStables, generating a histogram, validating the content of SStables, and more.
|
||||
* :doc:`Scylla Types tool </operating-scylla/admin-tools/scylla-types/>` - An admin tool that allows you to examine raw values obtained from SStables, logs, coredumps, etc., by printing, validating or comparing the values.
|
||||
* :doc:`Virtual Tables </operating-scylla/admin-tools/virtual-tables/>` - Tables that retrieve system-level information by generating their contents on-the-fly when queried.
|
||||
|
||||
* Virtual table for configuration - ``system.config``, allows you to query and update configuration over CQL.
|
||||
|
||||
@@ -83,7 +83,7 @@ overloaded_exception::overloaded_exception(size_t c) noexcept
|
||||
{}
|
||||
|
||||
rate_limit_exception::rate_limit_exception(const sstring& ks, const sstring& cf, db::operation_type op_type_, bool rejected_by_coordinator_) noexcept
|
||||
: cassandra_exception(exception_code::CONFIG_ERROR, prepare_message("Per-partition rate limit reached for {} in table {}.{}, rejected by {}", op_type_, ks, cf, rejected_by_coordinator_ ? "coordinator" : "replicas"))
|
||||
: cassandra_exception(exception_code::RATE_LIMIT_ERROR, prepare_message("Per-partition rate limit reached for {} in table {}.{}, rejected by {}", op_type_, ks, cf, rejected_by_coordinator_ ? "coordinator" : "replicas"))
|
||||
, op_type(op_type_)
|
||||
, rejected_by_coordinator(rejected_by_coordinator_)
|
||||
{ }
|
||||
|
||||
@@ -1037,10 +1037,10 @@ std::set<inet_address> gossiper::get_live_members() {
|
||||
|
||||
std::set<inet_address> gossiper::get_live_token_owners() {
|
||||
std::set<inet_address> token_owners;
|
||||
for (auto& member : get_live_members()) {
|
||||
auto es = get_endpoint_state_for_endpoint_ptr(member);
|
||||
if (es && !is_dead_state(*es) && get_token_metadata_ptr()->is_member(member)) {
|
||||
token_owners.insert(member);
|
||||
auto normal_token_owners = get_token_metadata_ptr()->get_all_endpoints();
|
||||
for (auto& node: normal_token_owners) {
|
||||
if (is_alive(node)) {
|
||||
token_owners.insert(node);
|
||||
}
|
||||
}
|
||||
return token_owners;
|
||||
@@ -1048,10 +1048,10 @@ std::set<inet_address> gossiper::get_live_token_owners() {
|
||||
|
||||
std::set<inet_address> gossiper::get_unreachable_token_owners() {
|
||||
std::set<inet_address> token_owners;
|
||||
for (auto&& x : _unreachable_endpoints) {
|
||||
auto& endpoint = x.first;
|
||||
if (get_token_metadata_ptr()->is_member(endpoint)) {
|
||||
token_owners.insert(endpoint);
|
||||
auto normal_token_owners = get_token_metadata_ptr()->get_all_endpoints();
|
||||
for (auto& node: normal_token_owners) {
|
||||
if (!is_alive(node)) {
|
||||
token_owners.insert(node);
|
||||
}
|
||||
}
|
||||
return token_owners;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "locator/ec2_snitch.hh"
|
||||
#include <seastar/core/seastar.hh>
|
||||
#include <seastar/core/sleep.hh>
|
||||
#include <seastar/core/do_with.hh>
|
||||
|
||||
#include <boost/algorithm/string/classification.hpp>
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
@@ -61,6 +63,30 @@ future<> ec2_snitch::start() {
|
||||
}
|
||||
|
||||
future<sstring> ec2_snitch::aws_api_call(sstring addr, uint16_t port, sstring cmd) {
|
||||
return do_with(int(0), [this, addr, port, cmd] (int& i) {
|
||||
return repeat_until_value([this, addr, port, cmd, &i]() -> future<std::optional<sstring>> {
|
||||
++i;
|
||||
return aws_api_call_once(addr, port, cmd).then([] (auto res) {
|
||||
return make_ready_future<std::optional<sstring>>(std::move(res));
|
||||
}).handle_exception([&i] (auto ep) {
|
||||
try {
|
||||
std::rethrow_exception(ep);
|
||||
} catch (const std::system_error &e) {
|
||||
logger().error(e.what());
|
||||
if (i >= AWS_API_CALL_RETRIES - 1) {
|
||||
logger().error("Maximum number of retries exceeded");
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
return sleep(AWS_API_CALL_RETRY_INTERVAL).then([] {
|
||||
return make_ready_future<std::optional<sstring>>(std::nullopt);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
future<sstring> ec2_snitch::aws_api_call_once(sstring addr, uint16_t port, sstring cmd) {
|
||||
return connect(socket_address(inet_address{addr}, port))
|
||||
.then([this, addr, cmd] (connected_socket fd) {
|
||||
_sd = std::move(fd);
|
||||
|
||||
@@ -16,6 +16,8 @@ public:
|
||||
static constexpr const char* ZONE_NAME_QUERY_REQ = "/latest/meta-data/placement/availability-zone";
|
||||
static constexpr const char* AWS_QUERY_SERVER_ADDR = "169.254.169.254";
|
||||
static constexpr uint16_t AWS_QUERY_SERVER_PORT = 80;
|
||||
static constexpr int AWS_API_CALL_RETRIES = 5;
|
||||
static constexpr auto AWS_API_CALL_RETRY_INTERVAL = std::chrono::seconds{5};
|
||||
|
||||
ec2_snitch(const snitch_config&);
|
||||
virtual future<> start() override;
|
||||
@@ -32,5 +34,6 @@ private:
|
||||
output_stream<char> _out;
|
||||
http_response_parser _parser;
|
||||
sstring _zone_req;
|
||||
future<sstring> aws_api_call_once(sstring addr, uint16_t port, const sstring cmd);
|
||||
};
|
||||
} // namespace locator
|
||||
|
||||
6
main.cc
6
main.cc
@@ -600,6 +600,12 @@ To start the scylla server proper, simply invoke as: scylla server (or just scyl
|
||||
|
||||
cfg->broadcast_to_all_shards().get();
|
||||
|
||||
// We pass this piece of config through a global as a temporary hack.
|
||||
// See the comment at the definition of sstables::global_cache_index_pages.
|
||||
smp::invoke_on_all([&cfg] {
|
||||
sstables::global_cache_index_pages = cfg->cache_index_pages.operator utils::updateable_value<bool>();
|
||||
}).get();
|
||||
|
||||
::sighup_handler sighup_handler(opts, *cfg);
|
||||
auto stop_sighup_handler = defer_verbose_shutdown("sighup", [&] {
|
||||
sighup_handler.stop().get();
|
||||
|
||||
@@ -467,6 +467,8 @@ static constexpr unsigned do_get_rpc_client_idx(messaging_verb verb) {
|
||||
// should not be blocked by any data requests.
|
||||
case messaging_verb::GROUP0_PEER_EXCHANGE:
|
||||
case messaging_verb::GROUP0_MODIFY_CONFIG:
|
||||
// ATTN -- if moving GOSSIP_ verbs elsewhere, mind updating the tcp_nodelay
|
||||
// setting in get_rpc_client(), which assumes gossiper verbs live in idx 0
|
||||
return 0;
|
||||
case messaging_verb::PREPARE_MESSAGE:
|
||||
case messaging_verb::PREPARE_DONE_MESSAGE:
|
||||
@@ -737,7 +739,7 @@ shared_ptr<messaging_service::rpc_protocol_client_wrapper> messaging_service::ge
|
||||
}();
|
||||
|
||||
auto must_tcp_nodelay = [&] {
|
||||
if (idx == 1) {
|
||||
if (idx == 0) {
|
||||
return true; // gossip
|
||||
}
|
||||
if (_cfg.tcp_nodelay == tcp_nodelay_what::local) {
|
||||
|
||||
@@ -826,6 +826,7 @@ public:
|
||||
|
||||
void apply(tombstone deleted_at) {
|
||||
_deleted_at.apply(deleted_at);
|
||||
maybe_shadow();
|
||||
}
|
||||
|
||||
void apply(shadowable_tombstone deleted_at) {
|
||||
|
||||
@@ -444,7 +444,7 @@ public:
|
||||
// When throws, the cursor is invalidated and its position is not changed.
|
||||
bool advance_to(position_in_partition_view lower_bound) {
|
||||
maybe_advance_to(lower_bound);
|
||||
return no_clustering_row_between(_schema, lower_bound, position());
|
||||
return no_clustering_row_between_weak(_schema, lower_bound, position());
|
||||
}
|
||||
|
||||
// Call only when valid.
|
||||
|
||||
@@ -571,6 +571,20 @@ bool no_clustering_row_between(const schema& s, position_in_partition_view a, po
|
||||
}
|
||||
}
|
||||
|
||||
// Returns true if and only if there can't be any clustering_row with position >= a and < b.
|
||||
// It is assumed that a <= b.
|
||||
inline
|
||||
bool no_clustering_row_between_weak(const schema& s, position_in_partition_view a, position_in_partition_view b) {
|
||||
clustering_key_prefix::equality eq(s);
|
||||
if (a.has_key() && b.has_key()) {
|
||||
return eq(a.key(), b.key())
|
||||
&& (a.get_bound_weight() == bound_weight::after_all_prefixed
|
||||
|| b.get_bound_weight() != bound_weight::after_all_prefixed);
|
||||
} else {
|
||||
return !a.has_key() && !b.has_key();
|
||||
}
|
||||
}
|
||||
|
||||
// Includes all position_in_partition objects "p" for which: start <= p < end
|
||||
// And only those.
|
||||
class position_range {
|
||||
|
||||
19
querier.cc
19
querier.cc
@@ -413,25 +413,6 @@ future<bool> querier_cache::evict_one() noexcept {
|
||||
co_return false;
|
||||
}
|
||||
|
||||
future<> querier_cache::evict_all_for_table(const utils::UUID& schema_id) noexcept {
|
||||
for (auto ip : {&_data_querier_index, &_mutation_querier_index, &_shard_mutation_querier_index}) {
|
||||
auto& idx = *ip;
|
||||
for (auto it = idx.begin(); it != idx.end();) {
|
||||
if (it->second->schema().id() == schema_id) {
|
||||
auto reader_opt = it->second->permit().semaphore().unregister_inactive_read(querier_utils::get_inactive_read_handle(*it->second));
|
||||
it = idx.erase(it);
|
||||
--_stats.population;
|
||||
if (reader_opt) {
|
||||
co_await reader_opt->close();
|
||||
}
|
||||
} else {
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
co_return;
|
||||
}
|
||||
|
||||
future<> querier_cache::stop() noexcept {
|
||||
co_await _closing_gate.close();
|
||||
|
||||
|
||||
@@ -383,11 +383,6 @@ public:
|
||||
/// is empty).
|
||||
future<bool> evict_one() noexcept;
|
||||
|
||||
/// Evict all queriers that belong to a table.
|
||||
///
|
||||
/// Should be used when dropping a table.
|
||||
future<> evict_all_for_table(const utils::UUID& schema_id) noexcept;
|
||||
|
||||
/// Close all queriers and wait on background work.
|
||||
///
|
||||
/// Should be used before destroying the querier_cache.
|
||||
|
||||
@@ -369,6 +369,9 @@ public:
|
||||
index_t log_last_snapshot_idx() const {
|
||||
return _log.get_snapshot().idx;
|
||||
}
|
||||
index_t log_last_conf_idx() const {
|
||||
return _log.last_conf_idx();
|
||||
}
|
||||
|
||||
// Return the last configuration entry with index smaller than or equal to `idx`.
|
||||
// Precondition: `log_last_idx()` >= `idx` >= `log_last_snapshot_idx()`.
|
||||
|
||||
@@ -40,6 +40,11 @@ struct awaited_index {
|
||||
optimized_optional<abort_source::subscription> abort;
|
||||
};
|
||||
|
||||
struct awaited_conf_change {
|
||||
promise<> promise;
|
||||
optimized_optional<abort_source::subscription> abort;
|
||||
};
|
||||
|
||||
static const seastar::metrics::label server_id_label("id");
|
||||
static const seastar::metrics::label log_entry_type("log_entry_type");
|
||||
static const seastar::metrics::label message_type("message_type");
|
||||
@@ -101,7 +106,7 @@ private:
|
||||
server::configuration _config;
|
||||
std::optional<promise<>> _stepdown_promise;
|
||||
std::optional<shared_promise<>> _leader_promise;
|
||||
std::optional<promise<>> _non_joint_conf_commit_promise;
|
||||
std::optional<awaited_conf_change> _non_joint_conf_commit_promise;
|
||||
// Index of the last entry applied to `_state_machine`.
|
||||
index_t _applied_idx;
|
||||
std::list<active_read> _reads;
|
||||
@@ -114,7 +119,13 @@ private:
|
||||
condition_variable _applied_index_changed;
|
||||
|
||||
struct stop_apply_fiber{}; // exception to send when apply fiber is needs to be stopepd
|
||||
queue<std::variant<std::vector<log_entry_ptr>, snapshot_descriptor>> _apply_entries = queue<std::variant<std::vector<log_entry_ptr>, snapshot_descriptor>>(10);
|
||||
|
||||
struct removed_from_config{}; // sent to applier_fiber when we're not a leader and we're outside the current configuration
|
||||
using applier_fiber_message = std::variant<
|
||||
std::vector<log_entry_ptr>,
|
||||
snapshot_descriptor,
|
||||
removed_from_config>;
|
||||
queue<applier_fiber_message> _apply_entries = queue<applier_fiber_message>(10);
|
||||
|
||||
struct stats {
|
||||
uint64_t add_command = 0;
|
||||
@@ -883,7 +894,7 @@ future<> server_impl::io_fiber(index_t last_stable) {
|
||||
for (const auto& e: batch.committed) {
|
||||
const auto* cfg = get_if<raft::configuration>(&e->data);
|
||||
if (cfg != nullptr && !cfg->is_joint()) {
|
||||
std::exchange(_non_joint_conf_commit_promise, std::nullopt)->set_value();
|
||||
std::exchange(_non_joint_conf_commit_promise, std::nullopt)->promise.set_value();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -904,9 +915,13 @@ future<> server_impl::io_fiber(index_t last_stable) {
|
||||
std::exchange(_stepdown_promise, std::nullopt)->set_value();
|
||||
}
|
||||
if (!_current_rpc_config.contains(_id)) {
|
||||
// If the node is no longer part of a config and no longer the leader
|
||||
// it will never know the status of entries it submitted
|
||||
drop_waiters();
|
||||
// - It's important we push this after we pushed committed entries above. It
|
||||
// will cause `applier_fiber` to drop waiters, which should be done after we
|
||||
// notify all waiters for entries committed in this batch.
|
||||
// - This may happen multiple times if `io_fiber` gets multiple batches when
|
||||
// we're outside the configuration, but it should eventually (and generally
|
||||
// quickly) stop happening (we're outside the config after all).
|
||||
co_await _apply_entries.push_eventually(removed_from_config{});
|
||||
}
|
||||
// request aborts of snapshot transfers
|
||||
abort_snapshot_transfers();
|
||||
@@ -986,11 +1001,11 @@ future<> server_impl::applier_fiber() {
|
||||
while (true) {
|
||||
auto v = co_await _apply_entries.pop_eventually();
|
||||
|
||||
if (std::holds_alternative<std::vector<log_entry_ptr>>(v)) {
|
||||
auto& batch = std::get<0>(v);
|
||||
co_await std::visit(make_visitor(
|
||||
[this] (std::vector<log_entry_ptr>& batch) -> future<> {
|
||||
if (batch.empty()) {
|
||||
logger.trace("[{}] applier fiber: received empty batch", _id);
|
||||
continue;
|
||||
co_return;
|
||||
}
|
||||
|
||||
// Completion notification code assumes that previous snapshot is applied
|
||||
@@ -1048,8 +1063,8 @@ future<> server_impl::applier_fiber() {
|
||||
}
|
||||
_stats.snapshots_taken++;
|
||||
}
|
||||
} else {
|
||||
snapshot_descriptor& snp = std::get<1>(v);
|
||||
},
|
||||
[this] (snapshot_descriptor& snp) -> future<> {
|
||||
assert(snp.idx >= _applied_idx);
|
||||
// Apply snapshot it to the state machine
|
||||
logger.trace("[{}] apply_fiber applying snapshot {}", _id, snp.id);
|
||||
@@ -1058,7 +1073,15 @@ future<> server_impl::applier_fiber() {
|
||||
_applied_idx = snp.idx;
|
||||
_applied_index_changed.broadcast();
|
||||
_stats.sm_load_snapshot++;
|
||||
},
|
||||
[this] (const removed_from_config&) -> future<> {
|
||||
// If the node is no longer part of a config and no longer the leader
|
||||
// it may never know the status of entries it submitted.
|
||||
drop_waiters();
|
||||
co_return;
|
||||
}
|
||||
), v);
|
||||
|
||||
signal_applied();
|
||||
}
|
||||
} catch(stop_apply_fiber& ex) {
|
||||
@@ -1224,7 +1247,7 @@ future<> server_impl::abort() {
|
||||
_awaited_commits.clear();
|
||||
_awaited_applies.clear();
|
||||
if (_non_joint_conf_commit_promise) {
|
||||
std::exchange(_non_joint_conf_commit_promise, std::nullopt)->set_exception(stopped_error());
|
||||
std::exchange(_non_joint_conf_commit_promise, std::nullopt)->promise.set_exception(stopped_error());
|
||||
}
|
||||
|
||||
// Complete all read attempts with not_a_leader
|
||||
@@ -1269,6 +1292,13 @@ future<> server_impl::set_configuration(config_member_set c_new, seastar::abort_
|
||||
}
|
||||
|
||||
_stats.add_config++;
|
||||
|
||||
if (_non_joint_conf_commit_promise) {
|
||||
logger.warn("[{}] set_configuration: a configuration change is still in progress (at index: {}, config: {})",
|
||||
_id, _fsm->log_last_conf_idx(), cfg);
|
||||
throw conf_change_in_progress{};
|
||||
}
|
||||
|
||||
const auto& e = _fsm->add_entry(raft::configuration{std::move(c_new)});
|
||||
|
||||
// We've just submitted a joint configuration to be committed.
|
||||
@@ -1279,10 +1309,21 @@ future<> server_impl::set_configuration(config_member_set c_new, seastar::abort_
|
||||
// would be the one corresponding to our joint configuration,
|
||||
// no matter if the leader changed in the meantime.
|
||||
|
||||
auto f = _non_joint_conf_commit_promise.emplace().get_future();
|
||||
auto f = _non_joint_conf_commit_promise.emplace().promise.get_future();
|
||||
if (as) {
|
||||
_non_joint_conf_commit_promise->abort = as->subscribe([this] () noexcept {
|
||||
// If we're inside this callback, the subscription wasn't destroyed yet.
|
||||
// The subscription is destroyed when the field is reset, so if we're here, the field must be engaged.
|
||||
assert(_non_joint_conf_commit_promise);
|
||||
// Whoever resolves the promise must reset the field. Thus, if we're here, the promise is not resolved.
|
||||
std::exchange(_non_joint_conf_commit_promise, std::nullopt)->promise.set_exception(request_aborted{});
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
co_await wait_for_entry({.term = e.term, .idx = e.idx}, wait_type::committed, as);
|
||||
} catch (...) {
|
||||
_non_joint_conf_commit_promise.reset();
|
||||
// We need to 'observe' possible exceptions in f, otherwise they will be
|
||||
// considered unhandled and cause a warning.
|
||||
(void)f.handle_exception([id = _id] (auto e) {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <boost/range/adaptor/reversed.hpp>
|
||||
#include "range_tombstone_list.hh"
|
||||
#include "utils/allocation_strategy.hh"
|
||||
#include "utils/amortized_reserve.hh"
|
||||
#include <seastar/util/variant_utils.hh>
|
||||
|
||||
range_tombstone_list::range_tombstone_list(const range_tombstone_list& x)
|
||||
@@ -375,13 +376,13 @@ range_tombstone_list::reverter::insert(range_tombstones_type::iterator it, range
|
||||
|
||||
range_tombstone_list::range_tombstones_type::iterator
|
||||
range_tombstone_list::reverter::erase(range_tombstones_type::iterator it) {
|
||||
_ops.reserve(_ops.size() + 1);
|
||||
amortized_reserve(_ops, _ops.size() + 1);
|
||||
_ops.emplace_back(erase_undo_op(*it));
|
||||
return _dst._tombstones.erase(it);
|
||||
}
|
||||
|
||||
void range_tombstone_list::reverter::update(range_tombstones_type::iterator it, range_tombstone&& new_rt) {
|
||||
_ops.reserve(_ops.size() + 1);
|
||||
amortized_reserve(_ops, _ops.size() + 1);
|
||||
swap(it->tombstone(), new_rt);
|
||||
_ops.emplace_back(update_undo_op(std::move(new_rt), *it));
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "range_tombstone.hh"
|
||||
#include "query-request.hh"
|
||||
#include "utils/preempt.hh"
|
||||
#include "utils/chunked_vector.hh"
|
||||
#include <iosfwd>
|
||||
#include <variant>
|
||||
|
||||
@@ -106,7 +107,7 @@ class range_tombstone_list final {
|
||||
class reverter {
|
||||
private:
|
||||
using op = std::variant<erase_undo_op, insert_undo_op, update_undo_op>;
|
||||
std::vector<op> _ops;
|
||||
utils::chunked_vector<op> _ops;
|
||||
const schema& _s;
|
||||
protected:
|
||||
range_tombstone_list& _dst;
|
||||
|
||||
@@ -749,6 +749,25 @@ void reader_concurrency_semaphore::clear_inactive_reads() {
|
||||
}
|
||||
}
|
||||
|
||||
future<> reader_concurrency_semaphore::evict_inactive_reads_for_table(utils::UUID id) noexcept {
|
||||
inactive_reads_type evicted_readers;
|
||||
auto it = _inactive_reads.begin();
|
||||
while (it != _inactive_reads.end()) {
|
||||
auto& ir = *it;
|
||||
++it;
|
||||
if (ir.reader.schema()->id() == id) {
|
||||
do_detach_inactive_reader(ir, evict_reason::manual);
|
||||
ir.ttl_timer.cancel();
|
||||
ir.unlink();
|
||||
evicted_readers.push_back(ir);
|
||||
}
|
||||
}
|
||||
while (!evicted_readers.empty()) {
|
||||
std::unique_ptr<inactive_read> irp(&evicted_readers.front());
|
||||
co_await irp->reader.close();
|
||||
}
|
||||
}
|
||||
|
||||
std::runtime_error reader_concurrency_semaphore::stopped_exception() {
|
||||
return std::runtime_error(format("{} was stopped", _name));
|
||||
}
|
||||
@@ -771,11 +790,9 @@ future<> reader_concurrency_semaphore::stop() noexcept {
|
||||
co_return;
|
||||
}
|
||||
|
||||
flat_mutation_reader_v2 reader_concurrency_semaphore::detach_inactive_reader(inactive_read& ir, evict_reason reason) noexcept {
|
||||
auto reader = std::move(ir.reader);
|
||||
void reader_concurrency_semaphore::do_detach_inactive_reader(inactive_read& ir, evict_reason reason) noexcept {
|
||||
ir.detach();
|
||||
reader.permit()._impl->on_evicted();
|
||||
std::unique_ptr<inactive_read> irp(&ir);
|
||||
ir.reader.permit()._impl->on_evicted();
|
||||
try {
|
||||
if (ir.notify_handler) {
|
||||
ir.notify_handler(reason);
|
||||
@@ -794,7 +811,12 @@ flat_mutation_reader_v2 reader_concurrency_semaphore::detach_inactive_reader(ina
|
||||
break;
|
||||
}
|
||||
--_stats.inactive_reads;
|
||||
return reader;
|
||||
}
|
||||
|
||||
flat_mutation_reader_v2 reader_concurrency_semaphore::detach_inactive_reader(inactive_read& ir, evict_reason reason) noexcept {
|
||||
std::unique_ptr<inactive_read> irp(&ir);
|
||||
do_detach_inactive_reader(ir, reason);
|
||||
return std::move(irp->reader);
|
||||
}
|
||||
|
||||
void reader_concurrency_semaphore::evict(inactive_read& ir, evict_reason reason) noexcept {
|
||||
|
||||
@@ -187,6 +187,7 @@ private:
|
||||
std::optional<future<>> _execution_loop_future;
|
||||
|
||||
private:
|
||||
void do_detach_inactive_reader(inactive_read&, evict_reason reason) noexcept;
|
||||
[[nodiscard]] flat_mutation_reader_v2 detach_inactive_reader(inactive_read&, evict_reason reason) noexcept;
|
||||
void evict(inactive_read&, evict_reason reason) noexcept;
|
||||
|
||||
@@ -302,6 +303,9 @@ public:
|
||||
|
||||
/// Clear all inactive reads.
|
||||
void clear_inactive_reads();
|
||||
|
||||
/// Evict all inactive reads the belong to the table designated by the id.
|
||||
future<> evict_inactive_reads_for_table(utils::UUID id) noexcept;
|
||||
private:
|
||||
// The following two functions are extension points for
|
||||
// future inheriting classes that needs to run some stop
|
||||
|
||||
@@ -847,12 +847,12 @@ future<> shard_reader_v2::do_fill_buffer() {
|
||||
}
|
||||
|
||||
auto res = co_await(std::move(fill_buf_fut));
|
||||
_end_of_stream = res.end_of_stream;
|
||||
reserve_additional(res.buffer->size());
|
||||
for (const auto& mf : *res.buffer) {
|
||||
push_mutation_fragment(mutation_fragment_v2(*_schema, _permit, mf));
|
||||
co_await coroutine::maybe_yield();
|
||||
}
|
||||
_end_of_stream = res.end_of_stream;
|
||||
}
|
||||
|
||||
future<> shard_reader_v2::fill_buffer() {
|
||||
|
||||
@@ -1017,7 +1017,9 @@ future<> database::drop_column_family(const sstring& ks_name, const sstring& cf_
|
||||
remove(*cf);
|
||||
cf->clear_views();
|
||||
co_await cf->await_pending_ops();
|
||||
co_await _querier_cache.evict_all_for_table(cf->schema()->id());
|
||||
for (auto* sem : {&_read_concurrency_sem, &_streaming_concurrency_sem, &_compaction_concurrency_sem, &_system_read_concurrency_sem}) {
|
||||
co_await sem->evict_inactive_reads_for_table(uuid);
|
||||
}
|
||||
auto f = co_await coroutine::as_future(truncate(ks, *cf, std::move(tsf), snapshot));
|
||||
co_await cf->stop();
|
||||
f.get(); // re-throw exception from truncate() if any
|
||||
@@ -2238,10 +2240,14 @@ future<> database::stop() {
|
||||
|
||||
// try to ensure that CL has done disk flushing
|
||||
if (_commitlog) {
|
||||
dblog.info("Shutting down commitlog");
|
||||
co_await _commitlog->shutdown();
|
||||
dblog.info("Shutting down commitlog complete");
|
||||
}
|
||||
if (_schema_commitlog) {
|
||||
dblog.info("Shutting down schema commitlog");
|
||||
co_await _schema_commitlog->shutdown();
|
||||
dblog.info("Shutting down schema commitlog complete");
|
||||
}
|
||||
co_await _view_update_concurrency_sem.wait(max_memory_pending_view_updates());
|
||||
if (_commitlog) {
|
||||
|
||||
@@ -193,14 +193,14 @@ future<> run_resharding_jobs(sharded<sstables::sstable_directory>& dir, std::vec
|
||||
auto start = std::chrono::steady_clock::now();
|
||||
dblog.info("{}", fmt::format("Resharding {} for {}.{}", sstables::pretty_printed_data_size(total_size), ks_name, table_name));
|
||||
|
||||
co_await dir.invoke_on_all([&] (sstables::sstable_directory& d) -> future<> {
|
||||
co_await dir.invoke_on_all(coroutine::lambda([&] (sstables::sstable_directory& d) -> future<> {
|
||||
auto& table = db.local().find_column_family(ks_name, table_name);
|
||||
auto info_vec = std::move(reshard_jobs[this_shard_id()].info_vec);
|
||||
auto& cm = db.local().get_compaction_manager();
|
||||
auto max_threshold = table.schema()->max_compaction_threshold();
|
||||
co_await d.reshard(std::move(info_vec), cm, table, max_threshold, creator);
|
||||
co_await d.move_foreign_sstables(dir);
|
||||
});
|
||||
}));
|
||||
|
||||
auto duration = std::chrono::duration_cast<std::chrono::duration<float>>(std::chrono::steady_clock::now() - start);
|
||||
dblog.info("{}", fmt::format("Resharded {} for {}.{} in {:.2f} seconds, {}", sstables::pretty_printed_data_size(total_size), ks_name, table_name, duration.count(), sstables::pretty_printed_throughput(total_size, duration)));
|
||||
|
||||
@@ -586,7 +586,8 @@ table::seal_active_memtable(flush_permit&& flush_permit) noexcept {
|
||||
auto permit = std::move(flush_permit);
|
||||
auto r = exponential_backoff_retry(100ms, 10s);
|
||||
// Try flushing for around half an hour (30 minutes every 10 seconds)
|
||||
int allowed_retries = 30 * 60 / 10;
|
||||
int default_retries = 30 * 60 / 10;
|
||||
int allowed_retries = default_retries;
|
||||
std::optional<utils::phased_barrier::operation> op;
|
||||
size_t memtable_size;
|
||||
future<> previous_flush = make_ready_future<>();
|
||||
@@ -599,7 +600,19 @@ table::seal_active_memtable(flush_permit&& flush_permit) noexcept {
|
||||
} catch (...) {
|
||||
ex = std::current_exception();
|
||||
_config.cf_stats->failed_memtables_flushes_count++;
|
||||
auto abort_on_error = [ex] () {
|
||||
|
||||
if (try_catch<std::bad_alloc>(ex)) {
|
||||
// There is a chance something else will free the memory, so we can try again
|
||||
allowed_retries--;
|
||||
} else if (auto ep = try_catch<std::system_error>(ex)) {
|
||||
allowed_retries = ep->code().value() == ENOSPC ? default_retries : 0;
|
||||
} else if (auto ep = try_catch<storage_io_error>(ex)) {
|
||||
allowed_retries = ep->code().value() == ENOSPC ? default_retries : 0;
|
||||
} else {
|
||||
allowed_retries = 0;
|
||||
}
|
||||
|
||||
if (allowed_retries <= 0) {
|
||||
// At this point we don't know what has happened and it's better to potentially
|
||||
// take the node down and rely on commitlog to replay.
|
||||
//
|
||||
@@ -608,14 +621,6 @@ table::seal_active_memtable(flush_permit&& flush_permit) noexcept {
|
||||
// may end up in an infinite crash loop.
|
||||
tlogger.error("Memtable flush failed due to: {}. Aborting, at {}", ex, current_backtrace());
|
||||
std::abort();
|
||||
};
|
||||
if (try_catch<std::bad_alloc>(ex)) {
|
||||
// There is a chance something else will free the memory, so we can try again
|
||||
if (allowed_retries-- <= 0) {
|
||||
abort_on_error();
|
||||
}
|
||||
} else {
|
||||
abort_on_error();
|
||||
}
|
||||
}
|
||||
if (_async_gate.is_closed()) {
|
||||
@@ -681,7 +686,7 @@ table::seal_active_memtable(flush_permit&& flush_permit) noexcept {
|
||||
auto write_permit = permit.release_sstable_write_permit();
|
||||
|
||||
utils::get_local_injector().inject("table_seal_active_memtable_try_flush", []() {
|
||||
throw std::bad_alloc();
|
||||
throw std::system_error(ENOSPC, std::system_category(), "Injected error");
|
||||
});
|
||||
co_return co_await this->try_flush_memtable_to_sstable(old, std::move(write_permit));
|
||||
});
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user