Would anyone be interested in reviewing a patch related to Materialized Views? 

https://issues.apache.org/jira/browse/CASSANDRA-13547 
<https://issues.apache.org/jira/browse/CASSANDRA-13547> - Filtered materialized 
views missing data

Patch for 3.11 : 
https://github.com/apache/cassandra/compare/cassandra-3.11...krishna-koneru:cassandra-3.11-13547
 
<https://github.com/apache/cassandra/compare/cassandra-3.11...krishna-koneru:cassandra-3.11-13547>


Some background :

In ViewUpdateGenerator.java, computeTimestampForEntryDeletion()  method takes 
the biggest timestamp of all the columns (including non-pk) in the row and uses 
it in Deletion info when deleting. But, when inserting/updating, 
computeLivenessInfoForEntry() uses the biggest timestamp of the primary keys 
for liveliness info.This causes non-pk columns to be treated incorrectly (in 
some cases) as deleted because view tombstones can have higher timestamp than 
live cell from base row.

Fix makes computeLivenessInfoForEntry() to use the highest timestamp of all the 
columns (instead of just PK columns) for liveliness info .

Another problem fixed in the patch is updates to non-pk columns are not 
propagated to view if they are not denormalized in the view and have a filter 
specified on them.This is implemented as CQL syntax restriction which forces 
denormalisation of a non-pk column in view if it has a filter on it.(support 
for allowing filters on non-pk columns was added in CASSANDRA-10368 )


Thanks !


Reply via email to