Files
scylladb/test/cql/cdc_compact_storage_test.cql
Konstantin Osipov 1d1777b13a test: make cdc tests pass with tablets on by default
CDC is not supported with tablets, explicitly disable tablets
in CDC keyspace definition.
2024-10-02 06:37:14 -04:00

26 lines
1.3 KiB
SQL

-- CDC and tablets are not working together yet, turn them off.
CREATE KEYSPACE ks
WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': 1} AND
tablets = {'enabled': false};
USE ks;
create table tb2 (pk int, ck int, v int, PRIMARY KEY (pk, ck)) with compact storage and cdc = {'enabled': true, 'preimage': true, 'postimage': true};
-- Should add 2 rows (postimage + delta).
insert into tb2 (pk, ck, v) VALUES (2, 22, 111) USING TTL 2222;
select "cdc$batch_seq_no", "cdc$operation", "cdc$ttl", pk, ck, v from tb2_scylla_cdc_log;
-- Should add 3 rows (preimage + postimage + delta).
insert into tb2 (pk, ck, v) VALUES (2, 22, 1111) USING TTL 2223;
select "cdc$batch_seq_no", "cdc$operation", "cdc$ttl", pk, ck, v from tb2_scylla_cdc_log;
create table tb3 (pk int, ck int, PRIMARY KEY (pk, ck)) with compact storage and cdc = {'enabled': true, 'preimage': true, 'postimage': true};
-- Should add 2 rows (postimage + delta).
insert into tb3 (pk, ck) VALUES (2, 22) USING TTL 2222;
select "cdc$batch_seq_no", "cdc$operation", "cdc$ttl", pk, ck from tb3_scylla_cdc_log;
-- Should add 3 rows (preimage + postimage + delta).
insert into tb3 (pk, ck) VALUES (2, 22) USING TTL 2223;
select "cdc$batch_seq_no", "cdc$operation", "cdc$ttl", pk, ck from tb3_scylla_cdc_log;
drop table tb2;
drop table tb3;
-- cleanup
DROP KEYSPACE ks;