Duarte Nunes created CASSANDRA-14393:
----------------------------------------
Summary: Incorrect view updates
Key: CASSANDRA-14393
URL: https://issues.apache.org/jira/browse/CASSANDRA-14393
Project: Cassandra
Issue Type: Bug
Components: Materialized Views
Reporter: Duarte Nunes
Consider the following:
{noformat}
create table t (p int, c int, v1 int, v2 int, primary key(p, c));
create materialized view mv as select p, c, v1 from t
where p is not null and c is not null primary key (c, p);
insert into t (p, c, v1, v2) VALUES(1, 1, 1, 1) using ttl 5;
update t using ttl 1000 set v2 = 1 where p = 1 and c = 1;
delete v2 from t where p = 1 and c = 1;
// Wait 5 seconds
select * from mv;
c | p | v1
---+---+------
1 | 1 | null{noformat}
The view row should be dead after 5 seconds, but it is not.
This is because the liveness info calculated when deleting v2 is based on the
base table update liveness info, which has the timestamp of the first insert
statement. That liveness info is shadowed by the liveness info created in the
update, which has a higher timestamp.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]