cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] [Resolved] (CASSANDRA-4917) Optimize tombstone creation for ExpiringColumns
Date Sun, 24 Mar 2013 05:59:15 GMT


Jonathan Ellis resolved CASSANDRA-4917.

       Resolution: Fixed
    Fix Version/s: 2.0
         Reviewer: slebresne
         Assignee: Christian Spriegel
> Optimize tombstone creation for ExpiringColumns
> -----------------------------------------------
>                 Key: CASSANDRA-4917
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Christian Spriegel
>            Assignee: Christian Spriegel
>             Fix For: 2.0
> The goal of this ticket is to reduce the amount of tombstones created from ExpiringColumns.
> Currently tombstones will always stay a full gc_grace time, which is not neccessary for
ExpiringColumns. We only need to ensure that ExpiringColumn and tombstone together live as
long as gc_grace. If the ExpiringColumn's TTL>=gc_grace then we can create an already gcable
tombstone and drop that instantly.
> My initial proposal was to use the ExpiringColumns creation-timestamp as deletiontime
for the tombstone, but Sylvain pointed out that we should not mix local and client timestamps.
So I changed it to this:
> {code}
> public static Column create(ByteBuffer name, ByteBuffer value, long timestamp, int timeToLive,
int localExpirationTime, int expireBefore, IColumnSerializer.Flag flag)
> {
>     if (localExpirationTime >= expireBefore || flag == IColumnSerializer.Flag.PRESERVE_SIZE)
>         return new ExpiringColumn(name, value, timestamp, timeToLive, localExpirationTime);
>     // the column is now expired, we can safely return a simple tombstone
>     return new DeletedColumn(name, localExpirationTime-timeToLive, timestamp);
>     // return new DeletedColumn(name, localExpirationTime, timestamp); // old code
> }
> {code}
> This was discussed on the mailinglist:

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message