CASSANDRA-1837
Deleted columns become available again after a flush.
wrong computation
blocker
no
no exceptions, just returns more results than expected (previously deleted rows)
no
single file
no
0.7.0rc3
standard configuration of cassandra version 0.7.0rc3
1
1) insert column into cassandra without flushing (file write)
2) delete the inserted column (file write)
3) flush (file write)
4) query for the column (file read)
4
yes
yes
Have all the events been logged properly? Note: only answer “yes” if the log contains (directly or indirectly) all the input events. If, for example, 2 out of 3 input events are logged, this should be “no”.
1
easy
no
Deleted columns become available again after a flush. Very simple error.
With some domain knowledge, a developer found the error. This is happening because of a bug in a the way deleted rows are not interpreted once they leave the memtable in the CFS.getRangeSlice code. I.e. the flush does not recognize the delete and the purged data does not contain the delete operation. Thus querying for the data shows the “deleted” content as well.
yes
no
no
no
easy if developer has domain knowledge
Deleted rows are not interpreted once they leave the memtable in the CFS.getRangeSlice code
semantic
no
yes
Fix the code and allows the cassandra to interpret the delete operation when flushing the data to SStable.
+ columns.hasNext(); // force cf initializtion
+ try
+ {
+ if (columns.getColumnFamily().isMarkedForDelete())
+ lastDeletedAt = Math.max(lastDeletedAt, columns.getColumnFamily().getMarkedForDeleteAt());
+ }
no exceptions
11
none
7. Scope of the failure
single file (for all affected files)