Commit Graph

41771 Commits

Author SHA1 Message Date
Botond Dénes
be5a18c07d tools/scylla-nodetool: repair: set the jobThreads request parameter
Although ScyllaDB ignores this request parameter, the Java nodetools
sets it, so it is better to have the native one do the same for
symmetry. It makes testing easier.
Discovered with the more strict request matching introduced in the next
patches.
2024-03-14 03:26:13 -04:00
Kefu Chai
15bea069a9 docs: use less slangy language
this is a follow-up change of 1519904fb9, to incorporate the comment
from Anna Stuchlik.

Signed-off-by: Anna Stuchlik <anna.stuchlik@scylladb.com>

Closes scylladb/scylladb#17671
2024-03-13 13:33:37 +02:00
Avi Kivity
4db4b2279c Merge 'tools/scylla-nodetool: implement the last batch of commands' from Botond Dénes
This PR implements the following new nodetool commands:
* netstats
* tablehistograms/cfhistograms
* proxyhistograms

All commands come with tests and all tests pass with both the new and the current nodetool implementations.

Refs: https://github.com/scylladb/scylladb/issues/15588

Closes scylladb/scylladb#17651

* github.com:scylladb/scylladb:
  tools/scylla-nodetool: implement the proxyhistograms command
  tools/scylla-nodetool: implement the tableshistograms command
  tools/scylla-nodetool: introduce buffer_samples
  utils/estimated_histogram: estimated_histogram: add constructor taking buckets
  tools/scylla-nodetool: implement the netstats command
  tools/scylla-nodetool: add correct units to file_size_printer
2024-03-13 12:46:11 +02:00
Avi Kivity
e120ba3514 sstables: partition_index_cache: evict entries within a page gently
When the partition_index_cache is evicted, we yield for preemption between
pages, but not within a page.

Commit 3b2890e1db ("sstables: Switch index_list to chunked_vector
to avoid large allocations") recognized that index pages can be large enough
to overflow a 128k alignment block (this was before the index cache and
index entries were not stored in LSA then). However, it did not go as far as
to gently free individual entries; either the problem was not recognized
or wasn't as bad.

As the referenced issue shows, a fairly large stall can happen when freeing
the page. The workload had a large number of tombstones, so index selectivity
was poor.

Fix by evicting individual rows gently.

The fix ignores the case where rows are still references: it is unlikely
that all index pages will be referenced, and in any case skipping over
a referenced page takes an insignificant amount of time, compared to freeing
a page.

Fixes #17605

Closes scylladb/scylladb#17606
2024-03-13 10:44:37 +01:00
Marcin Maliszkiewicz
7b60752e47 test: fix cql connection problem in test_auth_raft_command_split
This is a speculative fix as the problem is observed only on CI.
When run_async is called right after driver_connect and get_cql
it fails with ConnectionException('Host has been marked down or
removed').

If the approach proves to be succesfull we can start to deprecate
base get_cql in favor of get_ready_cql. It's better to have robust
testing helper libraries than try to take care of it in every test
case separately.

Fixes #17713

Closes scylladb/scylladb#17772
2024-03-13 10:36:51 +01:00
Pavel Emelyanov
4d83a8c12c topology_coordinator: Mark constant class methods with const
Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes scylladb/scylladb#17756
2024-03-13 10:23:39 +02:00
Pavel Emelyanov
2e982df898 test/tablets: Generalize repair history loading
Two repair test cases verify that repair generated enough rows in the
history table. Both use identical code for that, worth generalizing

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes scylladb/scylladb#17761
2024-03-13 10:22:57 +02:00
Pavel Emelyanov
88a40b0dfa uuid: UUID_gen::get_UUID src argument is const pointer
Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes scylladb/scylladb#17762
2024-03-13 10:21:25 +02:00
Botond Dénes
53e3325845 Merge 'mutation: add fmt::formatter for mutation types' from Kefu Chai
before this change, we rely on the default-generated fmt::formatter created from operator<<, but fmt v10 dropped the default-generated formatter.

in this change, we define formatters for

* mutation_partition_v2::printer
* frozen_mutation::printer
* mutation

their operator<<:s are dropped.

Refs #13245

Closes scylladb/scylladb#17769

* github.com:scylladb/scylladb:
  mutation: add fmt::formatter for mutation
  mutation: add fmt::formatter for frozen_mutation::printer
  mutation: add fmt::formatter for mutation_partition_v2::printer
2024-03-13 10:13:09 +02:00
Pavel Emelyanov
488404e080 gms: Remove unused i_failure_detection_event_listener
Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes scylladb/scylladb#17765
2024-03-13 09:33:56 +02:00
Kefu Chai
fb4f48b4ed schema: add fmt::formatter for schema
before this change, we rely on the default-generated fmt::formatter
created from operator<<, but fmt v10 dropped the default-generated
formatter.

in this change, we define formatters for

* column_definition
* column_mapping
* ordinal_column_id
* raw_view_info
* schema
* view_ptr

their operator<<:s are dropped. but operator<< for schema is preserved,
as we are still printing `seastar::lw_shared_ptr<const schema>` with
our homebrew generic formatter for `seastar::lw_shared_ptr<>`, which
uses operator<< to print the pointee.

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#17768
2024-03-13 09:29:00 +02:00
Kefu Chai
85c4034495 .git: skip redis/lolwut.cc when scanning spelling errors
codespell reports "Nees" should be "Needs" but "Nees" is the last
name of Georg Nees. so it is not a misspelling. can should not be
fixed.

since the purpose of lolwut.cc is to display Redis version and
print a generative computer art. the one included by our version
was created by Georg Nees. since the LOLWUT command does not contain
business logic connected with scylladb, we don't lose a lot if skip
it when scanning for spelling errors. so, in this change, let's
skip it, this should silence one more warning from the github
codespell workflow.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#17770
2024-03-13 09:25:58 +02:00
Michał Chojnowski
75864e18a2 open-coredump.sh: respect http redirects
downloads.scylladb.com recently started redirecting from http to https
(via `301 Moved Permanently`).
This broke package downloading in open-coredump.sh.

To fix this, we have to instruct curl to follow redirects.

Closes scylladb/scylladb#17759
2024-03-13 08:57:04 +02:00
Pavel Emelyanov
d90db016bf treewide: Use partition_slice::is_reversed()
Continuation of cc56a971e8, more noisy places detected

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes scylladb/scylladb#17763
2024-03-13 08:52:46 +02:00
Botond Dénes
a329cc34b7 tools/scylla-nodetool: implement the proxyhistograms command 2024-03-13 02:06:30 -04:00
Botond Dénes
a52eddc9c1 tools/scylla-nodetool: implement the tableshistograms command 2024-03-13 02:06:30 -04:00
Botond Dénes
151fb5a53b tools/scylla-nodetool: introduce buffer_samples
Based on Origin's org.apache.cassandra.tools.NodeProbe.BufferSamples.
To be used to qunatile time latency histogram samples.
2024-03-13 02:06:30 -04:00
Botond Dénes
47ac7d70e4 utils/estimated_histogram: estimated_histogram: add constructor taking buckets
And bucket offsets. Allows constructing the histogram back from a json
format.
2024-03-13 02:06:30 -04:00
Botond Dénes
006bc84761 tools/scylla-nodetool: implement the netstats command 2024-03-13 02:06:10 -04:00
Botond Dénes
ec7e1a2e92 tools/scylla-nodetool: add correct units to file_size_printer
When printing human-readable file-sizes, the Java nodetool always uses
base-2 steps (1024) to arrive at the human-readable size, but it uses
the base-10 units (MB) and base-2 units (MiB) interchangeably.
Adapt file_size_printer to support both. Add a flag to control which is
used.
2024-03-13 02:05:22 -04:00
Kefu Chai
2d319fa789 mutation: add fmt::formatter for mutation
before this change, we rely on the default-generated fmt::formatter
created from operator<<, but fmt v10 dropped the default-generated
formatter.

in this change, we define formatters for mutation. but its operator<<
is preserved, as we are still using our homebrew generic formatter
for printing `std::vector<mutation>`, and this formatter is using
operator<< for printing the elements in vector.

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2024-03-13 11:07:42 +08:00
Kefu Chai
acd14f12f0 mutation: add fmt::formatter for frozen_mutation::printer
before this change, we rely on the default-generated fmt::formatter
created from operator<<, but fmt v10 dropped the default-generated
formatter.

in this change, we define formatters for frozen_mutation::printer,
and drop its operator.

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2024-03-13 10:47:22 +08:00
Kefu Chai
94d25e02ad mutation: add fmt::formatter for mutation_partition_v2::printer
before this change, we rely on the default-generated fmt::formatter created
from operator<<, but fmt v10 dropped the default-generated formatter.

in this change, we define formatters for mutation_partition_v2::printer, and
drop its operator<<

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2024-03-13 10:47:09 +08:00
Asias He
f74053af40 repair: Add dc option support for tablet repair
This patch adds the dc option support for table repair. The management
tool can use this option to select nodes in specific data centers to run
repair.

Fixes: #17550
Tests: repair_additional_test.py::TestRepairAdditional::test_repair_option_dc

Closes scylladb/scylladb#17571
2024-03-12 22:19:50 +02:00
Ferenc Szili
1da5b3033e scylla-nodetool: check for missing keyspace argument on describering
Calling scylla-nodetool with option describering and ommiting the keyspace
name argument results in a boost exception with the following error message:

error running operation: boost::wrapexcept<boost::bad_any_cast> (boost::bad_any_cast: failed conversion using boost::any_cast)

This change checks for the missing keyspace and outputs a more sensible
error message:

error processing arguments: keyspace must be specified

Closes scylladb/scylladb#17741
2024-03-12 21:19:11 +02:00
Avi Kivity
f410038296 Merge 'Use do_with_cql_env_thread() helper in storage proxy test' from Pavel Emelyanov
Just a cleanup -- replace do_with_cql_env + async with do_with_cql_env_thread

Closes scylladb/scylladb#17758

* github.com:scylladb/scylladb:
  test/storage_proxy: Restore indentation after previous patch
  test/storage_proxy: Use do_with_cql_env_thread()
2024-03-12 20:23:40 +02:00
Pavel Emelyanov
34477ad98e test/storage_proxy: Restore indentation after previous patch
Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2024-03-12 19:10:44 +03:00
Pavel Emelyanov
fd112446c2 test/storage_proxy: Use do_with_cql_env_thread()
One of the test cases explicitly wraps itself into async, but there's a
convenience helper for that already.

Indentation is deliberately left broken

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2024-03-12 19:10:33 +03:00
Pavel Emelyanov
3a734facc7 view_builder: Complete build step early if reader produces nothing
Builder works in "steps". Each step runs for a given base table, when a
new view is created it either initiates a step or appends to currently
running step.

Running a step means reading mutations from local sstables reader and
applying them to all views that has jumped into this step so far. When a
view is added to the step it remembers the current token value the step
is on. When step receives end-of-stream it rewinds to minimal-token.
Rewinding is done by closing current reader and creating a new one. Each
time token is advanced, all the views that meet the new token value for
the second time (i.e. -- scan full round) are marked as built and are
removed from step. When no views are left on step, it finishes.

The above machinery can break when rewinding the end-of-stream reader.
The trick is that a running step silently assumes that if the reader
once produced some token (and there can be a view that remembered this
token as its starting one), then after rewinding the reader would
generate the same token or greater. With tablets, however, that's not
the case. When a node is decommissioned tablets are cleaned and all
sstables are removed. Rewinding a reader after it makes empty reader
that produces no tokens from now on. Respectively, any build steps that
had captured tokens prior to cleanup would get stuck forever.

The fix is to check if the mutation consumer stepped at least one step
forward after rewind, and if no -- complete all the attached views.

fixes: #17293

Similar thing should happen if the base table is truncated with views
being built from it. Testing it steps on compaction assertion elsewhere
and needs more research.

refs: #17543

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes scylladb/scylladb#17548
2024-03-12 14:58:47 +02:00
Kefu Chai
69f140eea6 test.py: s/summarize_tests/summarize_boost_tests/
summarize_tests() is only used to summarize boost tests, so reflect
this fact using its name. we will need to summarize the tests which
generate JUnit XML as well, so this change also prepares for a
following-up change to implement a new summarize helper.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#17746
2024-03-12 14:49:01 +02:00
Pavel Emelyanov
def5fed619 api: Fix stats reported for row cache
Here are three endpoints in the api/cache_service that report "metrics"
for the row cache and the values they return

    - entries:  number of partitions
    - size:     number of partitions
    - capacity: used space

The size and capacity seem very inaccurate.

Comment says, that in C* the size should be weighted, but scylla doesn't
support weight of entries in cache. Also, capacity is configurable via
row_cache_size_in_mb config option or set_row_cache_capacity_in_mb API
call, but Scylla doesn't support both either.

This patch suggestes changing return values for size and capacity endpoints.

Despite row cache doesn't support weights, it's natural to return
used_space in bytes as the value, which is more accurate to what "size"
means rather than number of entries.

The capacity may return back total memory size, because this is what
Scylla really does -- row cache growth is only limited by other memory
consumers, not by configured limits.

fixes: #9418

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes scylladb/scylladb#17724
2024-03-12 13:44:59 +02:00
Pavel Emelyanov
a755914265 test/cql_query_test: Use string_view by value
The test carries const std::string_view& around, but the type is
lightweight class that can be copied around at the same cost as its
reference.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes scylladb/scylladb#17735
2024-03-12 13:44:04 +02:00
Kefu Chai
17fe4a6439 view_info: add fmt::formatter for view_info
before this change, we rely on the default-generated fmt::formatter
created from operator<<, but fmt v10 dropped the default-generated
formatter.

in this change, we define formatters for `view_info`, its operator<<
is dropped.

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#17745
2024-03-12 13:28:27 +02:00
Botond Dénes
f3735dc8e0 Merge 'utils: add fmt::formatter for utils types' from Kefu Chai
before this change, we rely on the default-generated fmt::formatter created
from operator<<, but fmt v10 dropped the default-generated formatter.

in this change, we define formatters for

* utils::human_readable_value
* std::strong_ordering
* std::weak_ordering
* std::partial_ordering
* utils::exception_container

Refs https://github.com/scylladb/scylladb/issues/13245

Closes scylladb/scylladb#17710

* github.com:scylladb/scylladb:
  utils/exception_container: add fmt::formatter for exception_container
  utils/human_readable: add fmt::formatter for human_readable_value
  utils: add fmt::formatter for std::strong_ordering and friends
2024-03-12 13:27:37 +02:00
Botond Dénes
8e90b856b5 Merge 'Extend test.py's ability to select test cases' from Pavel Emelyanov
This PR fixes comments left from #17481 , namely

- adds case selection to boost suite
- describes the case selection in documentation

Closes scylladb/scylladb#17721

* github.com:scylladb/scylladb:
  docs: Add info about the ability to run specific test case
  test.py: Support case selection for boost tests
2024-03-12 13:21:50 +02:00
Kefu Chai
9c1d517bcc data_dictionary: drop unused friend declaration
the corresponding implementation of operator<< was dropped in
a40d3fc25b, so there is no needs to
keep this friend declaration anymore.

also, drop `include <ostream>`, as this header does not reference
any of the ostream types with the change above.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#17743
2024-03-12 09:45:15 +02:00
Kefu Chai
af3b69a4d1 Update seastar submodule
* seastar 5d3ee980...a71bd96d (51):
  > util: add formatter for optimized_optional<>
  > build: search protobuf using package config
  > reactor: Move pieces of scollectd to scollectd
  > reactor: Remove write-only task_queue._current
  > Add missing include in tests/unit/rpc_test.cc
  > doc/io_tester.md: include request_type::unlink in the docs
  > doc/io-tester.md: update obsolete information in io_tester docs
  > io_tester/conf.yaml: include an example of request_type::unlink job
  > io_tester: implement request_type::unlink
  > reactor: Print correct errno on io_submit failure
  > src/core/reactor.cc: qualify metric function calls with "sm::"
  > build: add shard_id.hh to seastar library
  > thread: speed up thread creation in debug mode
  > include: add missing modules.hh import to shard_id.hh
  > prometheus: avoid ambiguity when calling MetricFamily.set_name()
  > util/log: add formatter for log_level
  > util/log: use string_view for log_level_names
  > perf: Calculate length of name column in perf tests
  > rpc_test: add a test for inter-compressor communication
  > rpc: in multi_algo_compressor_factory, propagate send_empty_frame
  > rpc: give compressors a way to send something over the connection
  > rpc: allow (and skip) empty compressed frames
  > metrics: change value_vector type to std::deque
  > HACKING.md: remove doc related to test_dist
  > test/unit: do not check if __cplusplus > 201703L
  > json_elements: s/foramted/formatted/
  > iostream: Refactor input_stream::read_exactly_part
  > add unit test to verify str.starts_with(str), str.ends_with(str) return true.
  > str.starts_with(str) and str.ends_with(str) should return true, just like std::string
  > rpc: Remove FrameType::header_and_buffer_type
  > rpc: Defuturize FrameType::return_type
  > rpc: Kill FrameType::get_size()
  > treewide: put std::invocable<> constraints in template param list
  > include: do not include unuser headers
  > rpc: fix a deadlock in connection::send()
  > iostream: Replace recursion by iteration in input_stream::read_exactly_part
  > core/bitops.hh: use std::integral when appropriate
  > treewide: include <concepts> instead of seastar/util/concepts.hh
  > abortable_fifo: fix the indent
  > treewide: expand `SEASTAR_CONCEPT` macro
  > util/concepts: always define SEASTAR_CONCEPT
  > file: Remove unused thread-pool arg from directory lister
  > seastar-json2code: collect required_query_params using a list
  > seastar-json2code: reduce the indent level
  > seastar-json2code: indent the enum and array elements
  > seastar-json2code: generate code for enum type using Template
  > seastar-json2code: extract add_operation() out
  > reactor: Re-ifdef SIGSEGV sigaction installing
  > reactor: Re-ifdef reactor::enable_timer()
  > reactor: Re-ifdef task_histogram_add_task()
  > reactor: Re-ifdef install_signal_handler_stack()

Closes scylladb/scylladb#17714
2024-03-12 09:19:28 +02:00
Botond Dénes
3a7364525f Merge 'test/alternator: improve metrics tests' from Nadav Har'El
This small series improves the Alternator tests for metrics:
1. Improves some comments in the test.
2. Restores a test that was previously hidden by two tests having the same name.
3. Adds tests for latency histogram metrics.

Closes scylladb/scylladb#17623

* github.com:scylladb/scylladb:
  test/alternator: tests for latency metrics
  test/alternator: improve comments and unhide hidden test
2024-03-12 09:13:17 +02:00
Kefu Chai
35fc065458 utils/exception_container: add fmt::formatter for exception_container
before this change, we rely on the default-generated fmt::formatter
created from operator<<, but fmt v10 dropped the default-generated
formatter.

in this change, we define formatters for `exception_container<..>`
and drop its operator<<.

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2024-03-12 14:53:55 +08:00
Kefu Chai
9300d7b80b utils/human_readable: add fmt::formatter for human_readable_value
before this change, we rely on the default-generated fmt::formatter created
from operator<<, but fmt v10 dropped the default-generated formatter.

in this change, we define formatters for `utils::human_readable_value`,
and drop its operator<<

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2024-03-12 14:53:55 +08:00
Kefu Chai
007d7f1355 utils: add fmt::formatter for std::strong_ordering and friends
before this change, we rely on the default-generated fmt::formatter created
from operator<<, but fmt v10 dropped the default-generated formatter.

in this change, we define formatters for

* std::strong_ordering
* std::weak_ordering
* std::partial_ordering

and their operator<<:s are moved to test/lib/test_utils.{hh,cc}, as they
are only used by Boost.test.

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2024-03-12 14:53:55 +08:00
Tomasz Grabiec
47a66d0150 Merge 'Handle tablet migration failure in wrapping-up stages' from Pavel Emelyanov
There are four stages left to handle: cleanup, cleanup_target, end_migration and revert_migration. All are handling removed nodes already, so the PR just extends the test.

fixes: #16527

Closes scylladb/scylladb#17684

* github.com:scylladb/scylladb:
  test/tablets_migration: Test revert_migration failure handling
  test/tablets_migration: Test end_migration failure handling
  test/tablets_migration: Test cleanup_target failure handling
  test/tablets_migration: Test cleanup failure handling
  test/tablets_migration: Prepare for do_... stages
  test/tablets_migration: Add ability to removenode via any other node
  test/tablets_migration: Wrap migration stages failing code into a helper class
  storage_service: Add failure injection to crash cleanup_tablet
2024-03-12 00:20:56 +01:00
Botond Dénes
c6cff53771 reader_concurrency_semaphore: use variable reference for metrics
Instead of a functor, for those metrics that just return the value of an
existing member variable. This is ever so slightly more efficient than a
functor.

Closes scylladb/scylladb#17726
2024-03-11 20:47:04 +02:00
Mikołaj Grzebieluch
cb17b4ac59 docs: maintenance socket: add section about accessing maintenance socket
Closes scylladb/scylladb#17701
2024-03-11 20:25:00 +02:00
Asias He
ebc0ab94e5 repair: Add ranges option support for tablet repair
The management tool, e.g., scylla manager, needs the ranges option to
select which ranges to repair on a node to schedule repair jobs.

This patch adds ranges option support.

E.g.,

curl -X POST "http://127.0.0.1:10000/storage_service/repair_async/ks1?ranges=-4611686018427387905:-1,4611686018427387903:9223372036854775807"

Fixes: #17416
Tests: test_tablet_repair_ranges_selection

Closes scylladb/scylladb#17436
2024-03-11 20:03:12 +02:00
Nadav Har'El
d207962e40 test/alternator: tests for latency metrics
In test/alternator/test_metrics.py we had tests for the operation-count
metrics for different Alternator API operations, but not for the latency
histograms for these same operations. So this patch adds the missing
tests (and removes a TODO asking to do that).

Note that only a subset of the operations - PutItem, GetItem, DeleteItem,
UpdateItem, and GetRecords - currently have a latency history, and this
test verifies this. We have an issue (Refs #17616) about adding latency
histograms for more operations - at which point we will be able to expand
this test for the additional operations.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
2024-03-11 19:26:59 +02:00
Nadav Har'El
970c2dc7a6 test/alternator: improve comments and unhide hidden test
The original goal of this patch was to improve comments in
test/alternator/test_metrics.py, but while doing that I discovered
that one of the test functions was hidden by a second test with
the same name! So this patch also renames the second test.

The test continues to work after this patch - the hidden test
was successful.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
2024-03-11 19:26:59 +02:00
Botond Dénes
7d31093d4b Merge 'storage_service/ownership: handle requests when tablets are enabled' from Patryk Wróbel
Before this change, when user tried to utilize
'storage_service/ownership/{keyspace}' API with
keyspace parameter that uses tablets, then internal
error was thrown. The code was calling a function,
that is intended for vnodes: get_vnode_effective_replication_map().

This commit introduces graceful handling of such scenario and
extends the API to allow passing 'cf' parameter that denotes
table name.

Now, when keyspace uses tablets and cf parameter is not passed
a descriptive error message is returned via BAD_REQUEST.
Users cannot query ownership for keyspace that uses tablets,
but they can query ownership for a table in a given keyspace that uses tablets.

Also, new tests have been added to test/rest_api/test_storage_service.py and
to test/topology_experimental_raft/test_tablets.py in order to verify the behavior
with and without tablets enabled.

Fixes: https://github.com/scylladb/scylladb/issues/17342

Closes scylladb/scylladb#17405

* github.com:scylladb/scylladb:
  storage_service/ownership: discard get_ownership() requests when tablets enabled
  storage_service/ownership/{keyspace}: handle requests when tablets are enabled
  locator/effective_replication_map: make 'get_ranges(inet_address ep)' virtual
  locator/tablets: add tablet_map::get_sorted_tokens()
  pylib/rest_client.py: add ownership API to ScyllaRESTAPIClient
  rest_api/test_storage_service: add simplistic tests of ownership API for vnodes
2024-03-11 14:55:26 +02:00
Kefu Chai
50c6fc1141 scylla-gdb: use current_scheduling_group_ptr instead of task_queue._current
Seastar removed `task_queue::_current` in
258b11220d343d8c7ae1a2ab056fb5e202723cc8 . let's adapt scylla-gdb.py
accordingly. despite that `current_scheduling_group_ptr()` is an internal
API, it's been around for a while, and relatively stable. so let's use
it instead.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#17720
2024-03-11 13:13:59 +02:00
Kamil Braun
65b4f754ff Merge 'gossiper: do_status_check: allow evicting dead nodes from membership with no host_id' from Benny Halevy
The short series allows do_status_check to handle down nodes that don't have HOST_ID application state.

Fixes #16936

Closes scylladb/scylladb#17024

* github.com:scylladb/scylladb:
  gossiper: do_status_check: fixup indentation
  gossiper: do_status_check: allow evicting dead nodes from membership with no host_id
  gossiper: print the host_id when endpoint state goes UP/DOWN
  gossiper: get_host_id: differentiate between no endpoint_state and no application_state
  gms: endpoint_state: add get_host_id
  gossiper: do_status_check: continue loop after evicting FatClient
2024-03-11 11:21:49 +01:00