When the initial version of rack-aware pairing was introduced, materialized views with tablets were still experimental. Since then, we decided that we'll only allow materialized views in clusters where the base table and the view are replicated on the same racks, with one replica of each tablet on each rack. This allows us to remove almost all logic from our base-view pairing. The only check for the paired view replica is now whether it's in the same rack as the base replica sending the update. In this patch we replace the simple and complex rack-aware pairing with the simple check above. Because of this, we have to remove a test case from network_topology_strategy_test which was testing complex pairing. The tested topology is not supported for views with tablets (or is unlikely to be supported, as it's a random test), so there's no use keeping the test. The test case for simple rack aware pairing was kept, but now we only test the case where each rack has one replica, not multiple. Additionally, we split finding of an unpaired replica to a separate function and partially rewrite it without reusing the helper stuctures that were present when calculating the simple and complex rack-aware pairing. We only look for an unpaired replica if we couldn't find a paired replica ourselves or if the number of view replicas didn't match the base replicas. If an unpaired replica appears while these conditions pass, we won't send an extra update, but that would be a new bug altogether, because we only expect the unpaired replica to appear during RF changes, so when these conditions aren't fulfilled. Fixes https://github.com/scylladb/scylladb/issues/26313
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.