Both ScyllaDB's and Datastax's documentation suggest that when creating a view with CREATE MATERIALIZED VIEW, its SELECT clause doesn't need to list the view's primary key columns because those are selected automatically. For example, our documentation has an example in https://docs.scylladb.com/manual/stable/features/materialized-views.html ``` CREATE MATERIALIZED VIEW building_by_city2 AS SELECT meters FROM buildings WHERE city IS NOT NULL PRIMARY KEY(city, name); ``` Note how the primary key columns - city and name - are not explicitly SELECTed. I just discovered that while this behavior was indeed true in Cassandra 3 (and still true in ScyllaDB), it actually got broken in Cassandra 4 and 5. I reported this apprent regression to Cassandra (CASSANDRA-20701), and proposing the regression test in this patch to ensure that Scylla can't suffer a similar regression in the future. The new test passes on ScyllaDB and Cassandra 3, but fails on Cassandra 4 and 5 (and therefore tagged with "cassandra_bug"). Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes scylladb/scylladb#24399
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.