David Capwell created CASSANDRA-20464: -----------------------------------------
Summary: Single node non partition restricted SAI query returned a row that didn't match the SELECT WHERE clause Key: CASSANDRA-20464 URL: https://issues.apache.org/jira/browse/CASSANDRA-20464 Project: Apache Cassandra Issue Type: Bug Components: Feature/SAI Reporter: David Capwell Assignee: Caleb Rackliffe https://github.com/apache/cassandra/pull/3995 SHA: b9aa139eea8dceafbee11806e54fccf8c991b6c2 {code} accord.utils.Property$PropertyError: Property error detected: Seed = 7125320270568386663 Examples = 2147483647 Pure = true Error: Unexpected results for query: SELECT * FROM ks6.tbl WHERE pk0 = 0x0000000000001800a600000000000000 AND v0 = ({-26056: 0x0000000000001b008000000000000000, -21531: 0x0000000000001c00a100000000000000, 17626: 0x0000000000001700ac00000000000000}, [00000000-0000-4d00-9600-000000000000]) AND s1 = [(-15, 0xf3, '2031-06-12T15:49:41.735Z'), (-39804064, 0xea1b24cda189, '2047-09-17T12:55:01.056Z'), (-177128752, 0x60, '1973-04-26T04:43:46.861Z')] AND ck0 = '1997-09-07T02:52:26.194Z' AND v1 = [{f0: 'fbdb:857d:2f3d:4446:b7fe:5869:ddd4:59b0'}] AND pk1 = 0x0000000000004700b700000000000000 LIMIT 981 ALLOW FILTERING Steps: 400 Values: State: Setup: CREATE KEYSPACE IF NOT EXISTS ks6 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; CREATE TYPE IF NOT EXISTS ks6."w3WpWQw0hwNIvcbbngL17iTbwwW3aFu" ( f0 inet );; CREATE TABLE ks6.tbl ( pk0 'org.apache.cassandra.db.marshal.LexicalUUIDType', pk1 'org.apache.cassandra.db.marshal.LexicalUUIDType', ck0 timestamp, s0 vector<frozen<list<date>>, 2> static, s1 vector<frozen<tuple<varint, blob, timestamp>>, 3> static, v0 frozen<tuple<frozen<map<smallint, 'org.apache.cassandra.db.marshal.LexicalUUIDType'>>, frozen<list<uuid>>>>, v1 vector<frozen<"w3WpWQw0hwNIvcbbngL17iTbwwW3aFu">, 1>, PRIMARY KEY ((pk0, pk1), ck0) ) WITH CLUSTERING ORDER BY (ck0 ASC) AND additional_write_policy = '99p' AND allow_auto_snapshot = true AND bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'NONE', 'rows_per_partition': 'NONE'} AND cdc = false AND comment = '' AND compaction = {'class': 'org.apache.cassandra.db.compaction.UnifiedCompactionStrategy', 'only_purge_repaired_tombstones': 'true', 'provide_overlapping_tombstones': 'ROW', 'tombstone_threshold': '0.18691611', 'unchecked_tombstone_compaction': 'false'} AND compression = {'enabled': 'false'} AND memtable = 'default' AND crc_check_chance = 1.0 AND default_time_to_live = 0 AND extensions = {} AND gc_grace_seconds = 864000 AND incremental_backups = true AND max_index_interval = 2048 AND memtable_flush_period_in_ms = 0 AND min_index_interval = 128 AND read_repair = 'BLOCKING' AND speculative_retry = '99p'; CREATE INDEX tbl_ck0 ON ks6.tbl(ck0) USING 'SAI'; CREATE INDEX tbl_v0 ON ks6.tbl(v0) USING 'SAI';: org.apache.cassandra.distributed.test.cql3.SingleNodeTableWalkTest.State History: 160: INSERT INTO ks6.tbl (pk0, pk1, ck0, s0, s1, v0, v1) VALUES (0x0000000000001800a600000000000000, 0x0000000000004700b700000000000000, '1997-09-07T02:52:26.194Z', [['-240459-10-18', '-5209105-03-10'], ['-5873406-02-24']], [(-15, 0xf3, '2031-06-12T15:49:41.735Z'), (-39804064, 0xea1b24cda189, '2047-09-17T12:55:01.056Z'), (-177128752, 0x60, '1973-04-26T04:43:46.861Z')], ({-26056: 0x0000000000001b008000000000000000, -21531: 0x0000000000001c00a100000000000000, 17626: 0x0000000000001700ac00000000000000}, [00000000-0000-4d00-9600-000000000000]), [{f0: 'b1f0:39de:b185:323e:e33a:4317:8ae4:d1bc'}]) USING TIMESTAMP 53 -- on node1 161: SELECT * FROM ks6.tbl WHERE pk0 = 0x0000000000001800a600000000000000 AND v0 = ({-26056: 0x0000000000001b008000000000000000, -21531: 0x0000000000001c00a100000000000000, 17626: 0x0000000000001700ac00000000000000}, [00000000-0000-4d00-9600-000000000000]) AND s1 = [(-15, 0xf3, '2031-06-12T15:49:41.735Z'), (-39804064, 0xea1b24cda189, '2047-09-17T12:55:01.056Z'), (-177128752, 0x60, '1973-04-26T04:43:46.861Z')] AND ck0 = '1997-09-07T02:52:26.194Z' AND v1 = [{f0: 'fbdb:857d:2f3d:4446:b7fe:5869:ddd4:59b0'}] AND pk1 = 0x0000000000004700b700000000000000 LIMIT 981 ALLOW FILTERING -- pk0 'org.apache.cassandra.db.marshal.LexicalUUIDType', v0 frozen<tuple<frozen<map<smallint, 'org.apache.cassandra.db.marshal.LexicalUUIDType'>>, frozen<list<uuid>>>> (indexed with SAI), s1 vector<frozen<tuple<varint, blob, timestamp>>, 3>, ck0 timestamp (indexed with SAI), v1 vector<frozen<"w3WpWQw0hwNIvcbbngL17iTbwwW3aFu">, 1>, pk1 'org.apache.cassandra.db.marshal.LexicalUUIDType', on node1 Caused by: java.lang.AssertionError: Unexpected rows found: pk0 | pk1 | ck0 | s0 | s1 | v0 | v1 0x0000000000001800a600000000000000 | 0x0000000000004700b700000000000000 | '1997-09-07T02:52:26.194Z' | [['-240459-10-18', '-5209105-03-10'], ['-5873406-02-24']] | [(-15, 0xf3, '2031-06-12T15:49:41.735Z'), (-39804064, 0xea1b24cda189, '2047-09-17T12:55:01.056Z'), (-177128752, 0x60, '1973-04-26T04:43:46.861Z')] | ({-26056: 0x0000000000001b008000000000000000, -21531: 0x0000000000001c00a100000000000000, 17626: 0x0000000000001700ac00000000000000}, [00000000-0000-4d00-9600-000000000000]) | [{f0: 'b1f0:39de:b185:323e:e33a:4317:8ae4:d1bc'}] Expected: pk0 | pk1 | ck0 | s0 | s1 | v0 | v1 {code} The issue looks to be that v1 doesn’t match {code} 0x0000000000001800a600000000000000, -- pk0 0x0000000000004700b700000000000000, -- pk1 '1997-09-07T02:52:26.194Z', -- ck0 [['-240459-10-18', '-5209105-03-10'], ['-5873406-02-24']], -- s0 [(-15, 0xf3, '2031-06-12T15:49:41.735Z'), (-39804064, 0xea1b24cda189, '2047-09-17T12:55:01.056Z'), (-177128752, 0x60, '1973-04-26T04:43:46.861Z')], -- s1 ({-26056: 0x0000000000001b008000000000000000, -21531: 0x0000000000001c00a100000000000000, 17626: 0x0000000000001700ac00000000000000}, [00000000-0000-4d00-9600-000000000000]), -- v0 [{f0: 'b1f0:39de:b185:323e:e33a:4317:8ae4:d1bc'}] -- v1 ) USING TIMESTAMP 53 -- on node1 SELECT * FROM ks6.tbl WHERE pk0 = 0x0000000000001800a600000000000000 AND v0 = ({-26056: 0x0000000000001b008000000000000000, -21531: 0x0000000000001c00a100000000000000, 17626: 0x0000000000001700ac00000000000000}, [00000000-0000-4d00-9600-000000000000]) AND s1 = [(-15, 0xf3, '2031-06-12T15:49:41.735Z'), (-39804064, 0xea1b24cda189, '2047-09-17T12:55:01.056Z'), (-177128752, 0x60, '1973-04-26T04:43:46.861Z')] AND ck0 = '1997-09-07T02:52:26.194Z' AND v1 = [{f0: 'fbdb:857d:2f3d:4446:b7fe:5869:ddd4:59b0'}] AND pk1 = 0x0000000000004700b700000000000000 LIMIT 981 ALLOW FILTERING -- pk0 'org.apache.cassandra.db.marshal.LexicalUUIDType', v0 frozen<tuple<frozen<map<smallint, 'org.apache.cassandra.db.marshal.LexicalUUIDType'>>, frozen<list<uuid>>>> (indexed with SAI), s1 vector<frozen<tuple<varint, blob, timestamp>>, 3>, ck0 timestamp (indexed with SAI), v1 vector<frozen<"w3WpWQw0hwNIvcbbngL17iTbwwW3aFu">, 1>, pk1 'org.apache.cassandra.db.marshal.LexicalUUIDType', on node1 {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org