-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cassandra 5.0 vector type CREATE/INSERT support
makes progress towards: #1014 The vector type is introduced by the currently in beta cassandra 5. See: https://cassandra.apache.org/doc/latest/cassandra/reference/vector-data-type.html Scylla does not support vector types and so the tests are setup to only compile/run with a new cassandra_tests config. This commit does not add support for retrieving the data via a SELECT. That was omitted to reduce scope and will be implemented in follow up work.
- Loading branch information
Showing
5 changed files
with
269 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This workflow runs cassandra5 specific tests # TODO: When cassandra 5.0.0 releases, delete this workflow and move RUSTFLAGS="--cfg cassandra_tests" into the cassandra.yml workflow | ||
name: Cassandra 5 beta tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 'branch-*' | ||
pull_request: | ||
branches: | ||
- main | ||
- 'branch-*' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: full | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup 3-node Cassandra cluster | ||
run: | | ||
docker compose -f test/cluster/cassandra5/docker-compose.yml up -d --wait | ||
# A separate step for building to separate measuring time of compilation and testing | ||
- name: Update rust toolchain | ||
run: rustup update | ||
- name: Build the project | ||
run: cargo build --verbose --tests --features "full-serialization" | ||
- name: Run tests on cassandra 5 beta | ||
run: | | ||
CDC='disabled' RUSTFLAGS="--cfg cassandra_tests" RUST_LOG=trace SCYLLA_URI=172.42.0.2:9042 SCYLLA_URI2=172.42.0.3:9042 SCYLLA_URI3=172.42.0.4:9042 cargo test --verbose --features "full-serialization" -- --skip test_views_in_schema_info --skip test_large_batch_statements | ||
- name: Stop the cluster | ||
if: ${{ always() }} | ||
run: docker compose -f test/cluster/cassandra5/docker-compose.yml stop | ||
- name: Print the cluster logs | ||
if: ${{ always() }} | ||
run: docker compose -f test/cluster/cassandra5/docker-compose.yml logs | ||
- name: Remove cluster | ||
run: docker compose -f test/cluster/cassandra5/docker-compose.yml down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# TODO: when cassandra 5.0.0 releases, remove this file and use cluster/cassandra/docker-compose.yml instead | ||
|
||
version: '2.4' # 2.4 is the last version that supports depends_on conditions for service health | ||
|
||
networks: | ||
public: | ||
name: scylla_rust_driver_public | ||
driver: bridge | ||
ipam: | ||
driver: default | ||
config: | ||
- subnet: 172.42.0.0/16 | ||
services: | ||
cassandra1: | ||
image: cassandra:5.0-beta1 | ||
healthcheck: | ||
test: [ "CMD", "cqlsh", "-e", "describe keyspaces" ] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 60 | ||
networks: | ||
public: | ||
ipv4_address: 172.42.0.2 | ||
environment: | ||
- CASSANDRA_BROADCAST_ADDRESS=172.42.0.2 | ||
- HEAP_NEWSIZE=512M | ||
- MAX_HEAP_SIZE=2048M | ||
cassandra2: | ||
image: cassandra:5.0-beta1 | ||
healthcheck: | ||
test: [ "CMD", "cqlsh", "-e", "describe keyspaces" ] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 60 | ||
networks: | ||
public: | ||
ipv4_address: 172.42.0.3 | ||
environment: | ||
- CASSANDRA_BROADCAST_ADDRESS=172.42.0.3 | ||
- CASSANDRA_SEEDS=172.42.0.2 | ||
- HEAP_NEWSIZE=512M | ||
- MAX_HEAP_SIZE=2048M | ||
depends_on: | ||
cassandra1: | ||
condition: service_healthy | ||
cassandra3: | ||
image: cassandra:5.0-beta1 | ||
healthcheck: | ||
test: [ "CMD", "cqlsh", "-e", "describe keyspaces" ] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 60 | ||
networks: | ||
public: | ||
ipv4_address: 172.42.0.4 | ||
environment: | ||
- CASSANDRA_BROADCAST_ADDRESS=172.42.0.4 | ||
- CASSANDRA_SEEDS=172.42.0.2,172.42.0.3 | ||
- HEAP_NEWSIZE=512M | ||
- MAX_HEAP_SIZE=2048M | ||
depends_on: | ||
cassandra2: | ||
condition: service_healthy |