incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jools <jool...@gmail.com>
Subject Re: Inserting new data, where the key points to a tombstone record.
Date Wed, 09 Jun 2010 09:57:14 GMT
On 9 June 2010 10:43, Sylvain Lebresne <sylvain@yakaz.com> wrote:

> > However, as a final point of clarification, is there a particular reason
> > that insert does not raise an exception when trying to insert over an
> > existing key, or when the key points to a tombstone record ?
>
> Inserting over an existing key is an update of the record and in the
> Cassandra
> data model, this is nothing exceptional, this is the normal way to do
> things,
> by design.
>
> There is however a technical reason why it would be hard to return an
> exception in the case you mention. The way Cassandra does inserts, it don't
> know when you insert something that another record with the same key
> exists.
> Writes only append stuffs. Checking that the key exists would slow down
> writes
> quite a bit.
>
>
I can see there are technical, and performance reasons for not checking that
a key exists. And from reading Martin's post it's clear that to make
certain scenarios work as expected one needs to alter the way the data is
organised.

I've got plenty of pointers now to allow me to alter my datasets to cover
these issues now, many thanks Martin and Sylvain for taking the time to
respond.

Best regards,

--Jools

Mime
View raw message