cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: get() with TTL update?
Date Mon, 24 May 2010 20:53:20 GMT
(a) cassandra does not use update-in-place storage so doing the update
as part of the get call isn't much of an efficiency gain
(b) I don't think it's a common enough use case to warrant special treatment

On Mon, May 24, 2010 at 2:19 PM, Omer van der Horst Jansen
<omerhj@gmail.com> wrote:
> We have an application that stores session data in Cassandra. The
> session data needs to be deleted after, say, one hour of inactivity. The
> CASSANDRA-699 TTL update in 0.7 looks like it will work very well for
> that.
>
> However, we have a few scenarios where some session data will be
> retrieved frequently, but not be updated at all. In that scenario we
> need to make sure that the TTL gets refreshed on each read. I'm
> currently handling this by rewriting the entire column with a new
> timestamp and TTL.
>
> That seems a bit inefficient. Sometimes the column data can be several
> megabytes in size, and the only things in the column that need to be
> updated are the timestamp and the TTL.
>
> Is there currently a way to just update the timestamp and TTL? If not,
> would it make sense to update the get method and the associated internal
> plumbing to allow for an optional TTL parameter?
>
> -Omer
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

Mime
View raw message