RE: Expiring Columns

2016-03-21 Thread Anubhav Kale
I think the answer is no. There are explicit checks in Read code path to ignore 
anything that’s past the TTL (based on local time of the node under question).

From: Anuj Wadehra [mailto:anujw_2...@yahoo.co.in]
Sent: Monday, March 21, 2016 5:19 AM
To: User 
Subject: Expiring Columns

Hi,

I want to understand how Expiring columns work in Cassandra.


Query:
Documentation says that once TTL of a column expires, tombstones are created/ 
marked when the sstable gets compacted. Is there a possibility that a query 
(range scan/ row query) returns expired column data just because the sstable 
never participated in a compaction after TTL of the column expired?

For Example:
  10 AM Data inserted with ttl=60 seconds
  10:05 AM A query is run on inserted data
  10:07 AM sstable is compacted and column is marked tombstone.

Will the query return expired data in above scenario? If yes/no, why?


Thanks
Anuj






Sent from Yahoo Mail on 
Android


Re: Expiring Columns

2016-03-21 Thread Nirmallya Mukherjee
Anuj, there are a couple of aspects that are important -1. Cassandra will not 
return data with expired TTLs even if compaction has not run2. How is 1 
possible? The read path will eliminate the expired TTLs from the result3. All 
tombstones (explicit delete as well as expired TTLs) hang around for some time 
(gc_grace_seconds)4. Once the gc_grace_seconds (default 10 days) are over the 
compaction will cleanup the tombstones in SSTables that are considered for 
compaction
Thanks,Nirmallya
 

On Monday, 21 March 2016 5:49 PM, Anuj Wadehra  
wrote:
 

 Hi,
I want to understand how Expiring columns work in Cassandra.

Query:Documentation says that once TTL of a column expires, tombstones are 
created/ marked when the sstable gets compacted. Is there a possibility that a 
query (range scan/ row query) returns expired column data just because the 
sstable never participated in a compaction after TTL of the column expired?
For Example:  10 AM Data inserted with ttl=60 seconds  10:05 AM A query is run 
on inserted data  10:07 AM sstable is compacted and column     is marked 
tombstone.
Will the query return expired data in above scenario? If yes/no, why?

ThanksAnuj





Sent from Yahoo Mail on Android

  

Re: Expiring Columns

2011-08-15 Thread Edward Capriolo
On Mon, Aug 15, 2011 at 6:51 PM, 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?
>
>

[default@edstest] use abc;
Authenticated to keyspace: abc
[default@abc] create column family abc;
7d4d8c30-c7bf-11e0--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


Re: Expiring Columns

2011-08-15 Thread aaron morton
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?
>