You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by David Boxenhorn <da...@lookin2.com> on 2010/07/01 11:20:14 UTC

Identifying Tombstones

I recently learned that when I get a key, I might get a tombstone.

How can I know if a returned key is a tombstone? (I need to ignore them for
my application.)

Re: Identifying Tombstones

Posted by Jonathan Ellis <jb...@gmail.com>.
http://wiki.apache.org/cassandra/FAQ#range_ghosts

On Thu, Jul 1, 2010 at 6:35 AM, Phil Stanhope <ps...@wimba.com> wrote:
> I understand that tombstones are internal implementation detail ... yet, the
> fact remains in 0.6.2 that a key/col creation followed by a delete of the
> key/col will result in the key being returned in a get_range_slices call. If
> the CF is flushed and compacted (after GCGraceSeconds), the key will not be
> returned in the get_range_slices call.
> David ... is this what you are referring to?
> Is there anyway to tell get_range_slices to return only keys that have a
> (any) column?
> -phil
> On Jul 1, 2010, at 9:03 AM, David Boxenhorn wrote:
>
> Great! Thanks!
>
>
> On Thu, Jul 1, 2010 at 3:40 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>>
>> Tombstones are internal to Cassandra and are never sent to the client.
>>
>> On Thu, Jul 1, 2010 at 2:20 AM, David Boxenhorn <da...@lookin2.com> wrote:
>> > I recently learned that when I get a key, I might get a tombstone.
>> >
>> > How can I know if a returned key is a tombstone? (I need to ignore them
>> > for
>> > my application.)
>> >
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of Riptano, the source for professional Cassandra support
>> http://riptano.com
>
>
>



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

Re: Identifying Tombstones

Posted by Jonathan Shook <js...@gmail.com>.
Or the same key, in some cases. If you have multiple operations
against the same columns 'at the same time', they ordering may be
indefinite.
This can happen if the effective resolution of your time stamp is
coarse enough to bracket multiple operations. Milliseconds are not
fine enough in many cases, and will be less adequate going forward.

On Thu, Jul 1, 2010 at 9:08 AM, Jonathan Ellis <jb...@gmail.com> wrote:
> On Thu, Jul 1, 2010 at 6:44 AM, Jools <jo...@gmail.com> wrote:
>> Should you try to write to the same column family using the same key as a
>> tombstone, it will be silently ignored.
>
> Only if you perform the write with a lower timestamp than the delete
> you previously performed.
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>

Re: Identifying Tombstones

Posted by Jonathan Ellis <jb...@gmail.com>.
On Thu, Jul 1, 2010 at 6:44 AM, Jools <jo...@gmail.com> wrote:
> Should you try to write to the same column family using the same key as a
> tombstone, it will be silently ignored.

Only if you perform the write with a lower timestamp than the delete
you previously performed.

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

Re: Identifying Tombstones

Posted by Jools <jo...@gmail.com>.
Just a short note to add....

If you delet a key, and it has not been removed via a flush and compaction,
it will be returned as a key with no (super)column(s) from a
get_range_slices call.

Should you try to write to the same column family using the same key as a
tombstone, it will be silently ignored. Something I've now worked around,
but it did cause me a few issues to start with.

Hope it helps....

--Jools



On 1 July 2010 14:35, Phil Stanhope <ps...@wimba.com> wrote:

> I understand that tombstones are internal implementation detail ... yet,
> the fact remains in 0.6.2 that a key/col creation followed by a delete of
> the key/col will result in the key being returned in a get_range_slices
> call. If the CF is flushed and compacted (after GCGraceSeconds), the key
> will not be returned in the get_range_slices call.
>
> David ... is this what you are referring to?
>
> Is there anyway to tell get_range_slices to return only keys that have a
> (any) column?
>
> -phil
>
> On Jul 1, 2010, at 9:03 AM, David Boxenhorn wrote:
>
> Great! Thanks!
>
>
> On Thu, Jul 1, 2010 at 3:40 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>
>> Tombstones are internal to Cassandra and are never sent to the client.
>>
>> On Thu, Jul 1, 2010 at 2:20 AM, David Boxenhorn <da...@lookin2.com>
>> wrote:
>> > I recently learned that when I get a key, I might get a tombstone.
>> >
>> > How can I know if a returned key is a tombstone? (I need to ignore them
>> for
>> > my application.)
>> >
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of Riptano, the source for professional Cassandra support
>> http://riptano.com
>>
>
>
>

Re: Identifying Tombstones

Posted by Phil Stanhope <ps...@wimba.com>.
I understand that tombstones are internal implementation detail ... yet, the fact remains in 0.6.2 that a key/col creation followed by a delete of the key/col will result in the key being returned in a get_range_slices call. If the CF is flushed and compacted (after GCGraceSeconds), the key will not be returned in the get_range_slices call.

David ... is this what you are referring to?

Is there anyway to tell get_range_slices to return only keys that have a (any) column?

-phil

On Jul 1, 2010, at 9:03 AM, David Boxenhorn wrote:

> Great! Thanks!
> 
> 
> On Thu, Jul 1, 2010 at 3:40 PM, Jonathan Ellis <jb...@gmail.com> wrote:
> Tombstones are internal to Cassandra and are never sent to the client.
> 
> On Thu, Jul 1, 2010 at 2:20 AM, David Boxenhorn <da...@lookin2.com> wrote:
> > I recently learned that when I get a key, I might get a tombstone.
> >
> > How can I know if a returned key is a tombstone? (I need to ignore them for
> > my application.)
> >
> 
> 
> 
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
> 


Re: Identifying Tombstones

Posted by David Boxenhorn <da...@lookin2.com>.
Great! Thanks!


On Thu, Jul 1, 2010 at 3:40 PM, Jonathan Ellis <jb...@gmail.com> wrote:

> Tombstones are internal to Cassandra and are never sent to the client.
>
> On Thu, Jul 1, 2010 at 2:20 AM, David Boxenhorn <da...@lookin2.com> wrote:
> > I recently learned that when I get a key, I might get a tombstone.
> >
> > How can I know if a returned key is a tombstone? (I need to ignore them
> for
> > my application.)
> >
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>

Re: Identifying Tombstones

Posted by Jonathan Ellis <jb...@gmail.com>.
Tombstones are internal to Cassandra and are never sent to the client.

On Thu, Jul 1, 2010 at 2:20 AM, David Boxenhorn <da...@lookin2.com> wrote:
> I recently learned that when I get a key, I might get a tombstone.
>
> How can I know if a returned key is a tombstone? (I need to ignore them for
> my application.)
>



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