Before these changes, we could create a materialized view specifying its ID, but the option was ignored. This commit makes Scylla respect the option. Now specifying the ID results in the MV being created with that specific ID. This way, Scylla's behavior is consistent with Cassandra's. Because Cassandra doesn't mention the option in its user documentation, we don't update it either in case the semantics of it changes in the future -- we want to have an open door for any modifications. Note that Cassandra returns a server error if the provided ID is already in use, both in the case of regular tables and MVs. That's most likely a bug. Instead of following that behavior, we stay consistent with the current semantics of creating a regular table in Scylla: if the provided ID is already used, return an InvalidRequest. The last thing worth pointing out is Cassandra handles `WITH ID = null` as a special case; normally, specifying an invalid ID results in a ConfigurationException, but a null is treated as a syntax error. As in the previous paragraph, we stay consistent with the semantics of regular tables and all invalid IDs, null included, lead to a ConfigurationException. We also add a few short tests verifying that the implementation works as intended.
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++ cql-pytest - 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.