cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <aa...@thelastpickle.com>
Subject Re: will compaction delete empty rows after all columns expired?
Date Thu, 31 May 2012 10:05:41 GMT
> You can set the gc_grace_secs as a little value and force major compaction after the row
is expired.  After then please check whether the row still exists.
There are some downsides to major compactions. (There have been some recent discussions).

You can provoke (some) minor compactions by:
* setting the min_compaction_threshold to 2 (not sure if nodetool in 0.7 supports this, you
may need to make a schema change)
* using nodetool flush
 
If you have some larger sstables that do not get compacted try the userDefinedCompaction()
method on the CompactionManager MBean via JMX (i may have gotten the names wrong there in
0.7). 

> So if I understand... the empty row will only be removed after gc_grace if enough compactions
have occurred so that all the column tombstones for the empty row are in a single SSTable
file?
We need to know that all the fragments of the row are contain in all of the sstables in the
compaction task. They don't have to be in the same SSTable. 

You need tombstones to stop columns written previously from appearing in the results. If we
purge the tombstone and a previous column value is in another sstable the delete will be undone.


If you cannot compact the tombstones away let us know. 

Hope that helps. 

-----------------
Aaron Morton
Freelance Developer
@aaronmorton
http://www.thelastpickle.com

On 31/05/2012, at 2:16 PM, Zhu Han wrote:

> On Thu, May 31, 2012 at 9:31 AM, Curt Allred <curt@mediosystems.com> wrote:
> No, these were not wide rows.  They are rows that formerly had one or 2 columns. The
columns are deleted but the empty rows dont go away, even after gc_grace_secs.
> 
> 
> The empty row goes away only during a compaction after the gc_grace_secs.
> 
> You can set the gc_grace_secs as a little value and force major compaction after the
row is expired.  After then please check whether the row still exists.
>  
> 
>  
> 
> So if I understand... the empty row will only be removed after gc_grace if enough compactions
have occurred so that all the column tombstones for the empty row are in a single SSTable
file?
> 
> 
> From: aaron morton [mailto:aaron@thelastpickle.com] 
> 
> 
>  
> 
> Minor compaction will remove the tombstones if the row only exists in the sstable being
compaction. 
> 
>  
> 
> Are these very wide rows that are constantly written to ? 
> 
>  
> 
> Cheers
> 
>  p.s. cassandra 1.0 really does rock. 
> 
> 


Mime
View raw message