On 4/26/10 2:44 AM, dir dir wrote:
Suppose I have a MPEG video files 15 MB. To save this video file into
Cassandra database I will store
this file into array of byte. One day, I feel this video is not
necessary again,
therefore I delete it from the database. My question is, after I
delete this
video from Cassandra database, should I perform defragmentation operation
into Cassandra's file database??
Yes, you will need to perform a compaction on the SSTable in order for
the data to be deleted from disk after a deletion from cassandra cluster.
http://wiki.apache.org/cassandra/DistributedDeletes
"
Thus, a delete operation can't just wipe out all traces of the data
being removed immediately: if we did, and a replica did not receive the
delete operation, when it becomes available again it will treat the
replicas that did receive the delete as having missed a write update,
and repair them! So, instead of wiping out data on delete, Cassandra
replaces it with a special value called a tombstone. The tombstone can
then be propagated to replicas that missed the initial remove request.
...
Here, we defined a constant, GCGraceSeconds, and had each node track
tombstone age locally. Once it has aged past the constant, it can be
GC'd during compaction (see MemtableSStable).
"
=Rob