commit | 31fa33fcb446e522947f899d948de4042be04c62 | [log] [tgz] |
---|---|---|
author | Francisco Guerrero <frankgh@apache.org> | Tue Nov 14 14:42:17 2023 -0800 |
committer | Yifan Cai <ycai@apache.org> | Thu Nov 30 01:56:17 2023 +0800 |
tree | 77547db577c11137406e7a8e6dafa80a9520fe90 | |
parent | c1a6225dac62db94fd3faee92513e84ba3b9b3b7 [diff] |
CASSANDRASC-76: Sidecar does not handle keyspaces and table names with mixed case Cassandra Sidecar does not properly handle API requests for endpoints that have keypaces or table names that need to be quoted, for example when names have mixed case or when the name is a reserved keyword in Cassandra. In this commit, we perform special handling when the keyspace or table names are quoted in the path params. We add tests to ensure that handling is correct. Additionally, we fix the validation for keyspaces and table names without quotes and add special validation for quoted names. Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-76
This is a Sidecar for the highly scalable Apache Cassandra database. For more information, see the Apache Cassandra web site and CIP-1.
This is project is still WIP.
We depend on the Cassandra in-jvm dtest framework for testing. Because these jars are not published, you must manually build the dtest jars before you can build the project.
./scripts/build-dtest-jars.sh
The build script supports two parameters:
REPO
- the Cassandra git repository to use for the source files. This is helpful if you need to test with a fork of the Cassandra codebase.git@github.com:apache/cassandra.git
BRANCHES
- a space-delimited list of branches to build. -default: "cassandra-4.1 trunk"
Remove any versions you may not want to test with. We recommend at least the latest (released) 4.X series and trunk
. See Testing for more details on how to choose which Cassandra versions to use while testing.
For multi-node in-jvm dtests, network aliases will need to be setup for each Cassandra node. The tests assume each node's ip address is 127.0.0.x, where x is the node id.
For example if you populated your cluster with 3 nodes, create interfaces for 127.0.0.2 and 127.0.0.3 (the first node of course uses 127.0.0.1).
To get up and running, create a temporary alias for every node except the first:
for i in {2..20}; do sudo ifconfig lo0 alias "127.0.0.${i}"; done
After you clone the git repo, you can use the gradle wrapper to build and run the project. Make sure you have Apache Cassandra running on the host & port specified in conf/sidecar.yaml
.
$ ./gradlew run
While setting up cassandra instance, make sure the data directories of cassandra are in the path stored in sidecar.yaml file, else modify data directories path to point to the correct directories for stream APIs to work.
The test framework is set up to run 4.1 and 5.1 (Trunk) tests (see TestVersionSupplier.java
) by default. You can change this via the Java property cassandra.sidecar.versions_to_test
by supplying a comma-delimited string. For example, -Dcassandra.sidecar.versions_to_test=4.0,4.1,5.1
.
You will need to use the “Add Projects” function of CircleCI to set up CircleCI on your fork. When promoted to create a branch, do not replace the CircleCI config, choose the option to do it manually. CircleCI will pick up the in project configuration.
We warmly welcome and appreciate contributions from the community. Please see CONTRIBUTING.md if you wish to submit pull requests.