Previously, global_tablet_token_metadata_barrier() could proceed with fencing even if some nodes did not acknowledge the barrier_and_drain. This could cause problems: * In scylladb/scylladb#26864, replica locks did not provide mutual exclusion, because “fenced out” requests from old topology versions could run in parallel with requests using newer versions. * In scylladb/scylladb#26375, the barrier could succeed even though we did not wait for closed sessions to become unused. This could leave aborted repair or streaming tasks running concurrently after a tablet transition was aborted, and thus running concurrently with the next transition. In this commit we add a parameter drain_all_nodes: bool to the global_token_metadata_barrier function. If this parameter is set, the barrier waits for all nodes to acknowledge the barrier_and_drain round of RPCs. If any of the nodes are not accessible or throw an error, such errors are rethrown to the caller. We set this parameter only in global_tablet_token_metadata_barrier since for topology migrations the old behavior should be preserved. In case of errors, the tablet migration is blocked until the problem goes away by itself or the problematic node is added to the ignore_nodes list. The test_fenced_out_on_tablet_migration_while_handling_paxos_verb is removed: with tablets, we now drain all nodes, so after a successful barrier_and_drain round there can be no coordinators with an old topology version. The fence_token check after executing a request on a replica is therefore unnecessary for tablets, but still required for vnodes, where topology changes do not wait for all nodes. Topology fencing is covered by test_fence_lwt_during_bootstrap. Fixes scylladb/scylladb#26864 Fixes scylladb/scylladb#26375
Scylla in-source tests.
For details on how to run the tests, see docs/dev/testing.md
Shared C++ utils, libraries are in lib/, for Python - pylib/
alternator - Python tests which connect to a single server and use the DynamoDB API unit, boost, raft - unit tests in C++ cqlpy - Python tests which connect to a single server and use CQL topology* - tests that set up clusters and add/remove nodes cql - approval tests that use CQL and pre-recorded output rest_api - tests for Scylla REST API Port 9000 scylla-gdb - tests for scylla-gdb.py helper script nodetool - tests for C++ implementation of nodetool
If you can use an existing folder, consider adding your test to it. New folders should be used for new large categories/subsystems, or when the test environment is significantly different from some existing suite, e.g. you plan to start scylladb with different configuration, and you intend to add many tests and would like them to reuse an existing Scylla cluster (clusters can be reused for tests within the same folder).
To add a new folder, create a new directory, and then
copy & edit its suite.ini.