You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Stephen McKamey <st...@mckamey.com> on 2011/08/16 00:51:52 UTC

Expiring Columns

I'm curious about Expiring Columns. Say I create a Column Family where *all*
of the Columns are set to be expiring columns. When a row's entire set of
columns have expired, will an empty row it sill be returned in range
queries? Or will it just be nicely compacted away?

Re: Expiring Columns

Posted by aaron morton <aa...@thelastpickle.com>.
I believe (have not tested) that you would still see the range ghosts talked about here http://wiki.apache.org/cassandra/FAQ#range_ghosts until compaction had removed all the columns, and the row once all the columns are gone. Expired columns are purged during compaction when their ttl runs out. 

Consider the range query in two parts. First get me row keys between here and there. Then get me the columns that match this SlicePredicate. 

Cheers

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

On 16/08/2011, at 10:51 AM, Stephen McKamey wrote:

> I'm curious about Expiring Columns. Say I create a Column Family where *all* of the Columns are set to be expiring columns. When a row's entire set of columns have expired, will an empty row it sill be returned in range queries? Or will it just be nicely compacted away?
> 


Re: Expiring Columns

Posted by Edward Capriolo <ed...@gmail.com>.
On Mon, Aug 15, 2011 at 6:51 PM, Stephen McKamey <st...@mckamey.com>wrote:

> I'm curious about Expiring Columns. Say I create a Column Family where
> *all* of the Columns are set to be expiring columns. When a row's entire set
> of columns have expired, will an empty row it sill be returned in range
> queries? Or will it just be nicely compacted away?
>
>

[default@edstest] use abc;
Authenticated to keyspace: abc
[default@abc] create column family abc;
7d4d8c30-c7bf-11e0-0000-242d50cf1fbc
Waiting for schema agreement...
... schemas agree across the cluster
[default@abc] set abc[ascii('a_ttl')][ascii('x')]=ascii('y') with ttl=50;
Value inserted.
[default@abc] list abc;
Using default limit of 100
-------------------
RowKey: 615f74746c
=> (column=78, value=y, timestamp=1313468660115000, ttl=50)

1 Row Returned.


***************************************getting
soda**************************************
[default@abc] list abc;
Using default limit of 100
-------------------
RowKey: 615f74746c

1 Row Returned.

http://wiki.apache.org/cassandra/FAQ#range_ghosts