Commit Graph

46643 Commits

Author SHA1 Message Date
Calle Wilund
5905c19ab4 encryption_at_rest_test: Add verbosity + earlier stream close to proxy
Refs #22628

Adds some verbosity to track issues with the network proxy used to test
EAR connector difficulties. Also adds an earlier close in input stream
to help network usage.

Note: This is a diagnostic helper. Still cannot repro the issue above.
2025-02-17 13:49:43 +00:00
Calle Wilund
83aa66da1a encryption: Add exception handler to context init (for tests)
Adds exception handler + cleanup for the case where we have a
bad config/env vars (hint minio) or similar, such that we fail
with exception during setting up the EAR context.
In a normal startup, this is ok. We will report the exception,
and the do a exit(1).

In tests however, we don't and active context will instead be
freed quite proper, in which case we need to call stop to ensure
we don't crash on shared pointer destruction on wrong shard.
Doing so will hide the real issue from whomever runs the test.
2025-02-17 13:49:42 +00:00
Kefu Chai
aa8c27b872 db: prevent accidental copies of result_set_row by making it move-only
result_set_row is a heavyweight object containing multiple cell types:
regular columns, partition keys, and static values. To prevent expensive
accidental copies, delete the copy constructor and replace it with:

1. A move constructor for efficient vector reallocation
2. An explicit copy() method when copies are actually needed

This change reduces overhead in some non-hot paths by eliminating implicit
deep copies. Please note, previously, in `create_view_from_mutation()`,
we kept a copy of `result_set_row`, and then reused `table_rs` for
holding the mutation for `scylla_tables`. Because we don't copy
the `result_set_row` in this change, in order to avoid invalidating
the `row` after reusing `table_rs` in the outer scope, we define a
new `table_rs` shadowing the one in the out scope.

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

Closes scylladb/scylladb#22741
2025-02-17 09:48:08 +02:00
Botond Dénes
57a06a4c35 Merge 'Enhance s3 client perf test with "uploading" facility and related tunables' from Pavel Emelyanov
The existing test measures latencies of object GET-s. That's nice (though incomplete), but we want to measure upload performance. Here it is.

refs: #22460

Closes scylladb/scylladb#22480

* github.com:scylladb/scylladb:
  test/perf/s3: Add --part-size-mb option for upload test
  test/perf/s3: Add uploading test
  test/perf/s3: Some renames not to be download-centric
  test/perf/s3: Make object/file name configurable
  test/perf/s3: Configure maximum number of sockets
  test/perf/s3: Remove parallelizm
  s3/client: Make http client connections limit configurable
2025-02-17 09:46:11 +02:00
Avi Kivity
81821d26cd cql3: functions: add set_intersection()
Given two sets of equivalent types, return the set
intersection.

This is a generic function which adapts to the actual
input type.

A unit test is added.

Closes scylladb/scylladb#22763
2025-02-16 14:06:29 +02:00
Nadav Har'El
4a2654865d Merge 'test.py: suport subfolders' from Artsiom Mishuta
this PR is propper(pythonic) chance of commit 288a47f815

Creating an own folder used to be needed for two reasons:

we want a separate test suite, with its own settings
we want to structure tests, e.g. tablets, raft, schema, gossip.
We've been creating many folders recently. However, test suite
infrastructure is expensive in test.py - each suite has its own
pool of servers, concurrency settings and so on.

Make it possible to structure tests without too many suites,
by supporting subfolders within a suite.

As an example, this PR move mv tests into a separate folder

custom test.py lookup also works.
tests can be run as:

1. ./tools/toolchain/dbuild ./test.py --no-gather-metrics --mode=dev topology_custom/mv/tablets/test_mv_tablets_empty_ip
2. ./tools/toolchain/dbuild ./test.py --no-gather-metrics --mode=dev topology_custom/mv/tablets
3. ./tools/toolchain/dbuild ./test.py --no-gather-metrics --mode=dev topology_custom/mv

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

Closes scylladb/scylladb#22816

* github.com:scylladb/scylladb:
  test.py: move mv tests into a separate folder
  test.py: suport subfolders
2025-02-16 12:36:25 +02:00
Andrei Chekun
17992c0456 Remove tox
Seems tox is not used anywhere, so there is no need to have it then.
Especially when it messes with pytest. In some cases it can change the
config dir in pytest run.

Closes scylladb/scylladb#22819
2025-02-16 12:23:55 +02:00
Kefu Chai
34517b09a2 alternator,streaming: fix comment typos
Fix misspellings in comments identified by the codespell tool.
fix typos in comment

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

Closes scylladb/scylladb#22829
2025-02-16 11:34:44 +02:00
Piotr Szymaniak
c1f186c98a alternator: re-enabling/changing existing stream's StreamViewType as well as disabling the nonexistent stream
Table updates that try to enable stream (while changing or not the
StreamViewType) on a table that already has the stream enabled
will result in ValidationError.

Table updates that try to disable stream on a table that does not
have the stream enabled will result in ValidationError.

Add two tests to verify the above.

Mark the test for changing the existing stream's StreamViewType
not to xfail.

Fixes scylladb/scylladb#6939

Closes scylladb/scylladb#22827
2025-02-16 09:57:49 +02:00
Jenkins Promoter
0d5f5e6c9d Update pgo profiles - x86_64 2025-02-15 20:32:23 +02:00
Jenkins Promoter
9daf50d424 Update pgo profiles - aarch64 2025-02-15 20:32:22 +02:00
Lakshmi Narayanan Sreethar
a145a2f83a scylla-gdb: scylla_read_stats: access schema via schema_ptr class
Switch to using schema_ptr wrapper when handling schema references in
scylla_read_stats function. The existing fallback for older versions
(where schema is already a raw pointer) remains preserved.

Fixes #18700

Signed-off-by: Lakshmi Narayanan Sreethar <lakshmi.sreethar@scylladb.com>

Closes scylladb/scylladb#22726
2025-02-15 20:32:22 +02:00
Calle Wilund
342df0b1a8 network_topology_strategy/alter ks: Remove dc:s from options once rf=0
Fixes #22688

If we set a dc rf to zero, the options map will still retain a dc=0 entry.
If this dc is decommissioned, any further alters of keyspace will fail,
because the union of new/old options will now contained an unknown keyword.

Change alter ks options processing to simply remove any dc with rf=0 on
alter, and treat this as an implicit dc=0 in nw-topo strategy.
This means we change the reallocate_tablets routine to not rely on
the strategy objects dc mapping, but the full replica topology info
for dc:s to consider for reallocation. Since we verify the input
on attribute processing, the amount of rf/tablets moved should still
be legal.

v2:
* Update docs as well.
v3:
* Simplify dc processing
* Reintroduce options empty check, but do early in ks_prop_defs
* Clean up unit test some

Closes scylladb/scylladb#22693
2025-02-15 20:32:22 +02:00
Nadav Har'El
f89235517d test/topology_custom: fix very slow test test_localnodes_broadcast_rpc_address
The test
topology_custom/test_alternator::test_localnodes_broadcast_rpc_address
sets up nodes with a silly "broadcast rpc address" and checks that
Alternator's "/localnodes" requests returns it correctly.

The problem is that although we don't use CQL in this test, the test
framework does open a CQL connection when the test starts, and closes
it when it ends. It turns out that when we set a silly "broadcast RPC
address", the driver tends to try to connect to it when shutting down,
I'm not even sure why. But the choice of the silly address was 1.2.3.4
is unfortunate, because this IP address is actually routable - and
the driver hangs until it times out (in practice, in a bit over two
minutes). This trivial patch changes 1.2.3.4 to 127.0.0.0 - and equally
silly address but one to which connections fail immediately.

Before this patch, the test often takes more than 2 minutes to finish
on my laptop, after this patch, it always finishes in 4-5 seconds.

Fixes #22744

Signed-off-by: Nadav Har'El <nyh@scylladb.com>

Closes scylladb/scylladb#22746
2025-02-15 20:32:22 +02:00
Botond Dénes
87e8e00de6 tools/scylla-nodetool: netstats: don't assume both senders and receivers
The code currently assumes that a session has both sender and receiver
streams, but it is possible to have just one or the other.
Change the test to include this scenario and remove this assumption from
the code.

Fixes: #22770

Closes scylladb/scylladb#22771
2025-02-15 20:32:22 +02:00
Pavel Emelyanov
1b44861e8f Merge 'sstable_loader: fix cross-shard resource cleanup in download_task_impl ' from Kefu Chai
This PR addresses two related issues in our task system:

1. Prepares for asynchronous resource cleanup by converting release_resources() to a coroutine. This refactoring enables future improvements in how we handle resource cleanup.

2. Fixes a cross-shard resource cleanup issue in the SSTable loader where destruction of per-shard progress elements could trigger "shared_ptr accessed on non-owner cpu" errors in multi-shard environments. The fix uses coroutines to ensure resources are released on their owner shards.

Fixes #22759

---

this change addresses a regression introduced by d815d7013c, which is contained by 2025.1 and master branches. so it should be backported to 2025.1 branch.

Closes scylladb/scylladb#22791

* github.com:scylladb/scylladb:
  sstable_loader: fix cross-shard resource cleanup in download_task_impl
  tasks: make release_resources() a coroutine
2025-02-15 20:32:22 +02:00
Kefu Chai
7ff0d7ba98 tree: Remove unused boost headers
This commit eliminates unused boost header includes from the tree.

Removing these unnecessary includes reduces dependencies on the
external Boost.Adapters library, leading to faster compile times
and a slightly cleaner codebase.

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

Closes scylladb/scylladb#22857
2025-02-15 20:32:22 +02:00
Raphael S. Carvalho
d78f57e94a service: Don't use new tablet_resize_finalization state until supported
In a rolling upgrade, nodes that weren't upgraded yet will not recognize
the new tablet_resize_finalization state, that serves both split and
merges, leading to a crash. To fix that, coordinator will pick the
old tablet_split_finalization state for serving split finalization,
until the cluster agrees on merge, so it can start using the new
generic state for resize finalization introduced in merge series.
Regression was introduced in e00798f.

Fixes #22840.

Reported-by: Tomasz Grabiec <tgrabiec@scylladb.com>
Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>

Closes scylladb/scylladb#22845
2025-02-15 20:32:22 +02:00
Li Bo
de8de50fb9 Remove redundant code in mutation_partition.cc
Use the defined `cdef` variable.

Closes scylladb/scylladb#22048
2025-02-15 20:32:22 +02:00
Nadav Har'El
26fa234f87 test/cqlpy,alternator: "--release" should not require AWS credentials
The script fetch_scylla.py is used by the "--release" option of
test/cqlpy/run and test/alternator/run to fetch a given release of
Scylla. The release is fetched from S3, and the script assumed that the
user properly set up $HOME/.aws/config and $HOME/.aws/credentials
to determine the source of that download and the credentials to do this.

But this is unnecessary - Scylla's "downloads.scylladb.com" bucket
actually allows **anonymous** downloads, and this is what we should use.

After this patch, fetch_scylla.py (and the "--release" option of the
run scripts) work correctly even for a user that doesn't have $HOME/.aws
set up at all.

This fix is especially important to new developers, who might not even
have AWS credentials to put into these files.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>

Closes scylladb/scylladb#22773
2025-02-15 20:32:22 +02:00
Pavel Emelyanov
8f61d26007 test/perf/s3: Add --part-size-mb option for upload test
Test now uses default internal part size, but for performance
comparisons its good to make it configurable.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2025-02-14 16:27:26 +03:00
Pavel Emelyanov
6211b39f4b test/perf/s3: Add uploading test
The test picks up a file and uploads it into the bucket, then prints the
time it took and uploading speed. For now it's enough, with existing S3
latencies more timing details can be obtained by turning on trace
logging on s3 logger.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2025-02-14 16:27:26 +03:00
Pavel Emelyanov
0919a70ac8 test/perf/s3: Some renames not to be download-centric
Now this test is all about reading objects. Rename some bits in it so
that they can be re-used by future uploading test as well.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2025-02-14 16:27:26 +03:00
Pavel Emelyanov
24c194dcf3 test/perf/s3: Make object/file name configurable
Now the download test first creates a temporary object and then reads
data from it. It's good to have an option to download pre-existing file.
This option will also be used for uploading test (next patches)

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2025-02-14 16:27:25 +03:00
Pavel Emelyanov
6b27642a79 test/perf/s3: Configure maximum number of sockets
Add the --sockets NR option that limits the number of sockets the
underlying http client is configured to have.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2025-02-14 16:27:25 +03:00
Pavel Emelyanov
230d4d7c5e test/perf/s3: Remove parallelizm
The test spawns several fibers that read the same file in parallel.
There's not much point in it, just makes the code harder to maintain.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2025-02-14 16:27:25 +03:00
Pavel Emelyanov
b52d1a3d99 s3/client: Make http client connections limit configurable
It's now calculated based on sched group shares, but for tests explicit
value is needed.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
2025-02-14 16:27:25 +03:00
Kefu Chai
b448fea260 sstable_loader: fix cross-shard resource cleanup in download_task_impl
Previously, download_task_impl's destructor would destroy per-shard progress
elements on whatever shard the task was destroyed on. In multi-shard
environments, this caused "shared_ptr accessed on non-owner cpu" errors when
attempting to free memory allocated on a different shard.

Fix by:
- Convert progress_per_shard into a sharded service
- Stop the service on owner shards during cleanup using coroutines
- Add operator+= to stream_progress to leverage seastar's built-in adder
  instead of a custom adder struct

Alternative approaches considered:

1. Using foreign_ptr: Rejected as it would require interface changes
   that complicate stream delegation. foreign_ptr manages the underlying
   pointee with another smart pointer but does not expose the smart
   pointer instance in its APIs, making it impossible to use
   shared_ptr<stream_progress> in the interface.
2. Using vector<stream_progress>: Rejected for similar interface
   compatibility reasons.

This solution maintains the existing interfaces while ensuring proper
cross-shard cleanup.

Fixes scylladb/scylladb#22759
Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2025-02-14 11:13:58 +08:00
Kefu Chai
4c1f1baab4 tasks: make release_resources() a coroutine
Convert tasks::task_manager::task::impl::release_resources() to a coroutine
to prepare for upcoming changes that will implement asynchronous resource
release.

This is a preparatory refactoring that enables future coroutine-based
implementation of resource cleanup logic.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2025-02-14 11:13:58 +08:00
Michał Chojnowski
294b839e34 test_rpc_compression.py: fix an overly-short timeout
The timeout of 10 seconds is too small for CI.
I didn't mean to make it so short, it was an accident.

Fix that by changing the timeout to 10 minutes.

Fixes scylladb/scylladb#22832

Closes scylladb/scylladb#22836
2025-02-13 17:49:39 +01:00
Gleb Natapov
d288d79d78 api: initialize token metadata API after starting the gossiper
Token metadata API now depend on gossiper to do ip to host id mappings,
so initialized it after the gossiper is initialized and de-initialized
it before gossiper is stopped.

Fixes: scylladb/scylladb#22743

Closes scylladb/scylladb#22760
2025-02-13 14:39:05 +01:00
Takuya ASADA
b5e306047f dist: fix upgrade error from 2024.1
We need to allow replacing nodetool from scylla-enterprise-tools < 2024.2,
just like we did for scylla-tools < 5.5.
This is required to make packages able to upgrade from 2024.1.

Fixes #22820

Closes scylladb/scylladb#22821
2025-02-13 12:36:24 +02:00
Botond Dénes
c57492bd73 Update tools/java submodule
* tools/java 807e991d...4f1353ba (1):
  > dist: support smooth upgrade from enterprise to source availalbe

Refs scylladb/scylladb#22820
2025-02-13 12:32:07 +02:00
Nadav Har'El
e6dcb605cb Merge 'Fix typos' from Dmitriy Rokhfeld (TripleChecker)
Hey, our tool caught a few typos in your repository.

Also, here is your site's error report: https://triplechecker.com/s/Dza11H/scylladb.com

Hope it's helpful!

Closes scylladb/scylladb#22787

* github.com:scylladb/scylladb:
  Fix typos
  Fix typos
2025-02-13 11:14:29 +02:00
TripleChecker
8d64be94e2 Fix typos 2025-02-13 01:54:08 +02:00
Wojciech Mitros
86838a147d test: skip test_complex_null_values in uf_typest_test
test_complex_null_values is currently flaky, causing many failures
in CI. The reason for the failures is unclear, and a fix might not
be simple, so because UDFs are experimental, for now let's skip
this test until the corresponding issue is fixed.

Refs scylladb/scylladb#22799

Closes scylladb/scylladb#22818
2025-02-12 21:37:34 +01:00
Andrei Chekun
54c165c94c test: Skip test_raft_voters because of existing issue
https://github.com/scylladb/scylladb/issues/18793

Closes scylladb/scylladb#22710
2025-02-12 16:41:17 +03:00
Anna Stuchlik
b860b2109f doc: add a warning for admins launching ScyllaDB on Azure
Fixes scylladb/scylladb#22686
Refs scylladb/scylladb#22505

Closes scylladb/scylladb#22687
2025-02-12 14:27:19 +01:00
Tomasz Grabiec
d8ea780244 Merge 'scylla-gdb.py: introduce scylla tablet-metadata command' from Botond Dénes
Dumps the content of the tablet metadata. Very useful for debugging tablet related problems.

Example output:
```
(gdb) scylla tablet-metadata --table usertable_no_lwt

This node: host_id: b90662a9-98b1-4452-bc45-44d460ecab62, shard: 0

table alternator_usertable_no_lwt.usertable_no_lwt: id: 68316fa0-78ec-11ef-af10-98d4ab71aac4, tablets: 32, resize decision: merge#1, transitions: 0
  tablet#0: last token: -8646911284551352321, replicas: [b5ddcd7e-45ed-4f20-8841-353bd82cc04c#0, 84d0cb45-1c6c-4870-b727-03db3130641f#0, b933959e-8134-4ba0-8c44-33dbd51170e9#0]
  tablet#1: last token: -8070450532247928833, replicas: [fb0167dc-7a7d-476d-b4a5-4a55a52dadff#0, 4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#0, ac2fdd20-2f54-4960-9856-27fd07ed38ef#0]
  tablet#2: last token: -7493989779944505345, replicas: [fb0167dc-7a7d-476d-b4a5-4a55a52dadff#1, 4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#1, b5ddcd7e-45ed-4f20-8841-353bd82cc04c#1]
  tablet#3: last token: -6917529027641081857, replicas: [ac2fdd20-2f54-4960-9856-27fd07ed38ef#1, b933959e-8134-4ba0-8c44-33dbd51170e9#1, 84d0cb45-1c6c-4870-b727-03db3130641f#1]
  tablet#4: last token: -6341068275337658369, replicas: [ac2fdd20-2f54-4960-9856-27fd07ed38ef#2, fb0167dc-7a7d-476d-b4a5-4a55a52dadff#2, b5ddcd7e-45ed-4f20-8841-353bd82cc04c#2]
  tablet#5: last token: -5764607523034234881, replicas: [4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#2, b933959e-8134-4ba0-8c44-33dbd51170e9#2, 84d0cb45-1c6c-4870-b727-03db3130641f#2]
  tablet#6: last token: -5188146770730811393, replicas: [84d0cb45-1c6c-4870-b727-03db3130641f#3, fb0167dc-7a7d-476d-b4a5-4a55a52dadff#3, ac2fdd20-2f54-4960-9856-27fd07ed38ef#3]
  tablet#7: last token: -4611686018427387905, replicas: [b5ddcd7e-45ed-4f20-8841-353bd82cc04c#3, b933959e-8134-4ba0-8c44-33dbd51170e9#3, 4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#3]
  tablet#8: last token: -4035225266123964417, replicas: [b933959e-8134-4ba0-8c44-33dbd51170e9#4, b5ddcd7e-45ed-4f20-8841-353bd82cc04c#4, ac2fdd20-2f54-4960-9856-27fd07ed38ef#4]
  tablet#9: last token: -3458764513820540929, replicas: [4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#4, fb0167dc-7a7d-476d-b4a5-4a55a52dadff#4, 84d0cb45-1c6c-4870-b727-03db3130641f#4]
  tablet#10: last token: -2882303761517117441, replicas: [84d0cb45-1c6c-4870-b727-03db3130641f#5, fb0167dc-7a7d-476d-b4a5-4a55a52dadff#5, 4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#5]
  tablet#11: last token: -2305843009213693953, replicas: [ac2fdd20-2f54-4960-9856-27fd07ed38ef#5, b5ddcd7e-45ed-4f20-8841-353bd82cc04c#5, b933959e-8134-4ba0-8c44-33dbd51170e9#5]
  tablet#12: last token: -1729382256910270465, replicas: [b933959e-8134-4ba0-8c44-33dbd51170e9#6, b5ddcd7e-45ed-4f20-8841-353bd82cc04c#6, 84d0cb45-1c6c-4870-b727-03db3130641f#6]
  tablet#13: last token: -1152921504606846977, replicas: [4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#6, ac2fdd20-2f54-4960-9856-27fd07ed38ef#6, fb0167dc-7a7d-476d-b4a5-4a55a52dadff#6]
  tablet#14: last token: -576460752303423489, replicas: [b5ddcd7e-45ed-4f20-8841-353bd82cc04c#7, 84d0cb45-1c6c-4870-b727-03db3130641f#7, 4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#7]
  tablet#15: last token: -1, replicas: [b933959e-8134-4ba0-8c44-33dbd51170e9#7, ac2fdd20-2f54-4960-9856-27fd07ed38ef#7, fb0167dc-7a7d-476d-b4a5-4a55a52dadff#7]
  tablet#16: last token: 576460752303423487, replicas: [ac2fdd20-2f54-4960-9856-27fd07ed38ef#8, fb0167dc-7a7d-476d-b4a5-4a55a52dadff#8, 84d0cb45-1c6c-4870-b727-03db3130641f#8]
  tablet#17: last token: 1152921504606846975, replicas: [b933959e-8134-4ba0-8c44-33dbd51170e9#8, 4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#8, b5ddcd7e-45ed-4f20-8841-353bd82cc04c#8]
  tablet#18: last token: 1729382256910270463, replicas: [b5ddcd7e-45ed-4f20-8841-353bd82cc04c#9, 4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#9, fb0167dc-7a7d-476d-b4a5-4a55a52dadff#9]
  tablet#19: last token: 2305843009213693951, replicas: [84d0cb45-1c6c-4870-b727-03db3130641f#9, ac2fdd20-2f54-4960-9856-27fd07ed38ef#9, b933959e-8134-4ba0-8c44-33dbd51170e9#9]
  tablet#20: last token: 2882303761517117439, replicas: [ac2fdd20-2f54-4960-9856-27fd07ed38ef#10, 4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#10, b933959e-8134-4ba0-8c44-33dbd51170e9#10]
  tablet#21: last token: 3458764513820540927, replicas: [84d0cb45-1c6c-4870-b727-03db3130641f#10, b5ddcd7e-45ed-4f20-8841-353bd82cc04c#10, fb0167dc-7a7d-476d-b4a5-4a55a52dadff#10]
  tablet#22: last token: 4035225266123964415, replicas: [4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#11, 84d0cb45-1c6c-4870-b727-03db3130641f#11, b933959e-8134-4ba0-8c44-33dbd51170e9#11]
  tablet#23: last token: 4611686018427387903, replicas: [b5ddcd7e-45ed-4f20-8841-353bd82cc04c#11, ac2fdd20-2f54-4960-9856-27fd07ed38ef#11, fb0167dc-7a7d-476d-b4a5-4a55a52dadff#11]
  tablet#24: last token: 5188146770730811391, replicas: [b5ddcd7e-45ed-4f20-8841-353bd82cc04c#12, 84d0cb45-1c6c-4870-b727-03db3130641f#12, fb0167dc-7a7d-476d-b4a5-4a55a52dadff#12]
  tablet#25: last token: 5764607523034234879, replicas: [ac2fdd20-2f54-4960-9856-27fd07ed38ef#12, 4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#12, b933959e-8134-4ba0-8c44-33dbd51170e9#12]
  tablet#26: last token: 6341068275337658367, replicas: [b5ddcd7e-45ed-4f20-8841-353bd82cc04c#13, b933959e-8134-4ba0-8c44-33dbd51170e9#13, 84d0cb45-1c6c-4870-b727-03db3130641f#13]
  tablet#27: last token: 6917529027641081855, replicas: [ac2fdd20-2f54-4960-9856-27fd07ed38ef#13, fb0167dc-7a7d-476d-b4a5-4a55a52dadff#13, 4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#13]
  tablet#28: last token: 7493989779944505343, replicas: [b5ddcd7e-45ed-4f20-8841-353bd82cc04c#0, b933959e-8134-4ba0-8c44-33dbd51170e9#0, ac2fdd20-2f54-4960-9856-27fd07ed38ef#0]
  tablet#29: last token: 8070450532247928831, replicas: [fb0167dc-7a7d-476d-b4a5-4a55a52dadff#0, 84d0cb45-1c6c-4870-b727-03db3130641f#0, 4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#0]
  tablet#30: last token: 8646911284551352319, replicas: [fb0167dc-7a7d-476d-b4a5-4a55a52dadff#1, ac2fdd20-2f54-4960-9856-27fd07ed38ef#1, b5ddcd7e-45ed-4f20-8841-353bd82cc04c#1]
  tablet#31: last token: 9223372036854775807, replicas: [b933959e-8134-4ba0-8c44-33dbd51170e9#1, 4b1e8a42-e8b3-432e-bf7c-b0f7a10eb3cd#1, 84d0cb45-1c6c-4870-b727-03db3130641f#1]
```

The PR includes two marginally related small fixes too.

Improvement, no backport needed.

Closes scylladb/scylladb#20940

* github.com:scylladb/scylladb:
  scylla-gdb.py: add scylla tablet-metadata command
  scylla-gdb.py: register the scylla table command
  scylla-gdb.py: unordered_map: improve flat_hash_map matching
2025-02-12 13:27:36 +01:00
Andrei Chekun
9540e056a4 test: Add the possibility to run raft tests with pytest
Closes scylladb/scylladb#22775
2025-02-12 14:10:19 +02:00
Artsiom Mishuta
b36d586d80 test.py: move mv tests into a separate folder
Now that we support suite subfolders,
As an example, this commit move mv tests into a separate folder

custom test.py lookup also works.
tests can be run as:

1. ./tools/toolchain/dbuild ./test.py --no-gather-metrics --mode=dev topology_custom/mv/tablets/test_mv_tablets_empty_ip
2. ./tools/toolchain/dbuild ./test.py --no-gather-metrics --mode=dev topology_custom/mv/tablets
3. ./tools/toolchain/dbuild ./test.py --no-gather-metrics --mode=dev topology_custom/mv
2025-02-12 12:27:26 +01:00
Artsiom Mishuta
5ca025a8c1 test.py: suport subfolders
Creating an own folder used to be needed for two reasons:
- we want a separate test suite, with its own settings
- we want to structure tests, e.g. tablets, raft, schema, gossip.

We've been creating many folders recently. However, test suite
infrastructure is expensive in test.py - each suite has its own
pool of servers, concurrency settings and so on.

Make it possible to structure tests without too many suites,
by supporting subfolders within a suite.

Fixes #20570
2025-02-12 11:46:06 +01:00
Botond Dénes
7150442f6a service/storage_proxy: schedule_repair(): materialize the range into a vector
Said method passes down its `diff` input to `mutate_internal()`, after
some std::ranges massaging. Said massaging is destructive -- it moves
items from the diff. If the output range is iterated-over multiple
times, only the first time will see the actual output, further
iterations will get an empty range.
When trace-level logging is enabled, this is exactly what happens:
`mutate_internal()` iterates over the range multiple times, first to log
its content, then to pass it down the stack. This ends up resulting in
a range with moved-from elements being pased down and consequently write
handlers being created with nullopt mutations.

Make the range re-entrant by materializing it into a vector before
passing it to `mutate_internal()`.

Fixes: scylladb/scylladb#21907
Fixes: scylladb/scylladb#21714

Closes scylladb/scylladb#21910
2025-02-12 12:38:47 +02:00
Kefu Chai
6e1fb2c74e build: limit ThinLTO link parallelism to prevent OOM in release builds
When building Scylla with ThinLTO enabled (default with Clang), the linker
spawns threads equal to the number of CPU cores during linking. This high
parallelism can cause out-of-memory (OOM) issues in CI environments,
potentially freezing the build host or triggering the OOM killer.

In this change:

1. Rename `LINK_MEM_PER_JOB` to `Scylla_RAM_PER_LINK_JOB` and make it
   user-configurable
2. Add `Scylla_PARALLEL_LINK_JOBS` option to directly control concurrent
   link jobs (useful for hosts with large RAM)
3. Increase the default value of `Scylla_PARALLEL_LINK_JOBS` to 16 GiB
   when LTO is enabled
4. Default to 2 parallel link jobs when LTO is enabled if the calculated
   number if less than 2 for faster build.

Notes:
- Host memory is shared across job pools, so pool separation alone doesn't help
- Ninja lacks per-job memory quota support
- Only affects link parallelism in LTO-enabled builds

See
https://clang.llvm.org/docs/ThinLTO.html#controlling-backend-parallelism

Fixes scylladb/scylladb#22275

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

Closes scylladb/scylladb#22383
2025-02-12 10:24:13 +02:00
Alexander Turetskiy
3ac533251a allow "UTC" and "GMT" in string format of timestamp
fix problem with statements like:
INSERT INTO tbl (pk, time) VALUES (1, '2016-09-27 16:10:00 UTC');

fixes #20501

Closes scylladb/scylladb#22426
2025-02-12 09:38:28 +02:00
Alexander Turetskiy
47011ab830 Materialized view name length should be limited
Oversized materialized view and index names are rejected;
Materialized view names with invalid symbols are rejected.

fixes: #20755

Closes scylladb/scylladb#21746
2025-02-11 22:16:09 +02:00
Avi Kivity
5c647408c7 systemd: map libraries close to the executable
The Intel Optimizaton Manual states that branches with relative offsets
greater than 2GB suffer a penalty. They cite a 6% improvement when this
is avoided. Our code doesn't rely heavily on dynamically linked
libraries, so I don't expect a similar win, but it's still better to do
it than not.

Eliminate long branches by asking the dynamic linker to restrict itself
to the lower 4GB of the address space. I saw that it maps libraries
at 1GB+ addresses, so this satisfies the limitation.

Fix is from the Intel Optimization Manual as well.

This change was ported from ScyllaDB Enterprise.

Closes scylladb/scylladb#22498
2025-02-11 22:16:09 +02:00
Avi Kivity
de3b2c827f service: topology coordinator: demote log message about refreshing stats
This repeats every minute and isn't very interesting. Demote to debug
to reduce log clutter.

Closes scylladb/scylladb#22784
2025-02-11 22:16:09 +02:00
Botond Dénes
f808f84a45 db/config: improve description of repair_multishard_reader_enable_read_ahead
The current description has a typo and in general not informative enough
on when this option should be used.

Closes scylladb/scylladb#21758
2025-02-11 22:16:09 +02:00
Botond Dénes
be5c28e149 scylla-gdb.py: add scylla tablet-metadata command
Dumps the content of the tablet-metadata. Very useful for debugging
tablet-replated problems.
2025-02-11 07:29:46 -05:00