Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Duplicate
-
None
-
None
-
Normal
Description
Consider the following commands, ran against trunk@0f054fee5c:
echo "create keyspace ks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};" | bin/cqlsh echo "create table ks.base (p int primary key, v1 int, v2 int) with gc_grace_seconds = 1;" | bin/cqlsh echo "create materialized view ks.my_view as select * from ks.base where p is not null and v1 is not null primary key (v1, p);" | bin/cqlsh echo "insert into ks.base (p, v1, v2) values (3, 1, 3) using timestamp 1;" | bin/cqlsh bin/nodetool flush ks my_view base echo "delete from ks.base using timestamp 2 where p = 3;" | bin/cqlsh bin/nodetool flush ks my_view base echo "insert into ks.base (p, v1) values (3, 1) using timestamp 3;" | bin/cqlsh bin/nodetool flush ks my_view base echo "select * from ks.my_view;" | bin/cqlsh v1 | p | v2 ----+---+---- 1 | 3 | 3 (1 rows) echo "select * from ks.base;" | bin/cqlsh p | v1 | v2 ---+----+------ 3 | 1 | null (1 rows)
As you can see, this incorrectly brings back cell v2=3.
There is one definitive problem and a potential one:
- Merging rows must be commutative. If a shadowable tombstone is applied after a row tombstone, it will replace that tombstone; if a row marker shadows the shadowable tombstone before the row containing the original data is applied, then any dead cells in said data will be resurrected;
- Shadowable tombstones shouldn't compact away previous row tombstones or even deleted cells; if the relevant tombstones have been GCed from the base table, then a base table update won't carry them anymore (alongside a newer row marker).
Attachments
Issue Links
- is broken by
-
CASSANDRA-11475 MV code refactor
- Resolved
- is duplicated by
-
CASSANDRA-11500 Obsolete MV entry may not be properly deleted
- Resolved
- is related to
-
CASSANDRA-10261 Materialized Views Timestamp issues
- Resolved
-
CASSANDRA-13127 Materialized Views: View row expires too soon
- Resolved
- relates to
-
CASSANDRA-13547 Filtered materialized views missing data
- Resolved
-
CASSANDRA-11500 Obsolete MV entry may not be properly deleted
- Resolved