[ https://issues.apache.org/jira/browse/CASSANDRA-10910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15154040#comment-15154040 ]
Gábor Auth commented on CASSANDRA-10910: ---------------------------------------- I've upgraded to datastax-ddc-3.3.0 and... here is a materialized view: {code} > DESCRIBE MATERIALIZED VIEW unit_by_transport ; CREATE MATERIALIZED VIEW unit_by_transport AS SELECT * FROM unit WHERE transportid IS NOT NULL AND type IS NOT NULL PRIMARY KEY (transportid, id) WITH CLUSTERING ORDER BY (id ASC) AND bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} AND comment = '' AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} AND crc_check_chance = 1.0 AND dclocal_read_repair_chance = 0.1 AND default_time_to_live = 0 AND gc_grace_seconds = 864000 AND max_index_interval = 2048 AND memtable_flush_period_in_ms = 0 AND min_index_interval = 128 AND read_repair_chance = 0.0 AND speculative_retry = '99PERCENTILE'; {code} I cannot reproduce this but sometimes and somehow happened the same issue: {code} > SELECT transportid, id, type FROM unit_by_transport WHERE > transportid=24f90d20-d61f-11e5-9d3c-8fc3ad6906e2 and > id=99c05a70-d686-11e5-a169-97287061d5d1; transportid | id | type --------------------------------------+--------------------------------------+------ 24f90d20-d61f-11e5-9d3c-8fc3ad6906e2 | 99c05a70-d686-11e5-a169-97287061d5d1 | null (1 rows) > SELECT transportid, id, type FROM unit WHERE > id=99c05a70-d686-11e5-a169-97287061d5d1; transportid | id | type -------------+----+------ (0 rows) {code} Any idea behind this behavior? :) > Materialized view remained rows > ------------------------------- > > Key: CASSANDRA-10910 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10910 > Project: Cassandra > Issue Type: Bug > Environment: Cassandra 3.0.0 > Reporter: Gábor Auth > Assignee: Carl Yeksigian > Fix For: 3.0.3, 3.3 > > > I've created a table and a materialized view. > {code} > > CREATE TABLE test (id text PRIMARY KEY, key text, value int); > > CREATE MATERIALIZED VIEW test_view AS SELECT * FROM test WHERE key IS NOT > > NULL PRIMARY KEY(key, id); > {code} > I've put a value into the table: > {code} > > update test set key='key', value=1 where id='id'; > > select * from test; select * from test_view ; > id | key | value > ----+-----+------- > id | key | 1 > (1 rows) > key | id | value > -----+----+------- > key | id | 1 > (1 rows) > {code} > I've updated the value without specified the key of the materialized view: > {code} > > update test set value=2 where id='id'; > > select * from test; select * from test_view ; > id | key | value > ----+-----+------- > id | key | 2 > (1 rows) > key | id | value > -----+----+------- > key | id | 2 > (1 rows) > {code} > It works as I think... > ...but I've updated the key of the materialized view: > {code} > > update test set key='newKey' where id='id'; > > select * from test; select * from test_view ; > id | key | value > ----+--------+------- > id | newKey | 2 > (1 rows) > key | id | value > --------+----+------- > key | id | 2 > newKey | id | 2 > (2 rows) > {code} > ...I've updated the value of the row: > {code} > > update test set key='newKey', value=3 where id='id'; > > select * from test; select * from test_view ; > id | key | value > ----+--------+------- > id | newKey | 3 > (1 rows) > key | id | value > --------+----+------- > key | id | 2 > newKey | id | 3 > (2 rows) > {code} > ...I've deleted the row by the id key: > {code} > > delete from test where id='id'; > > select * from test; select * from test_view ; > id | key | value > ----+-----+------- > (0 rows) > key | id | value > -----+----+------- > key | id | 2 > (1 rows) > {code} > Is it a bug? -- This message was sent by Atlassian JIRA (v6.3.4#6332)