You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Peter Harrison <ch...@gmail.com> on 2010/09/30 23:25:56 UTC

Insert after Delete fails silently

If you delete a row, and it therefore is marked as tombstone, and
subsequently you try to insert the row again it appears to succeed,
but if you try to request the row you don't get a result.

If you try to insert a row that has been recently deleted, and has an
active tombstone I would expect either the tombstone marker to be
removed, or the insert to fail. It seems to currently accept the
insert and then subsequently the row can't be found.

Re: Insert after Delete fails silently

Posted by Benjamin Black <b...@b3k.us>.
On Thu, Sep 30, 2010 at 5:25 PM, Peter Harrison <ch...@gmail.com> wrote:
> If you delete a row, and it therefore is marked as tombstone, and
> subsequently you try to insert the row again it appears to succeed,
> but if you try to request the row you don't get a result.
>
> If you try to insert a row that has been recently deleted, and has an
> active tombstone I would expect either the tombstone marker to be
> removed, or the insert to fail. It seems to currently accept the
> insert and then subsequently the row can't be found.
>

The SSTables are immutable, so "removing" the tombstone is not an
option.  Instead, a new cell is written out as normal and the conflict
detection and resolution proceeds as usual.  As Aaron suggested, you
have most likely re-used or otherwise erred in your use of timestamps.


b

Re: Insert after Delete fails silently

Posted by Aaron Morton <aa...@thelastpickle.com>.
Are you re-using the timestamp from the first insert on the second insert? 

The insert must occur after the tombstone, otherwise cassandra will assume the tombstone is the current  version and ignore the delete. 

Aaron


On 01 Oct, 2010,at 10:25 AM, Peter Harrison <ch...@gmail.com> wrote:

If you delete a row, and it therefore is marked as tombstone, and
subsequently you try to insert the row again it appears to succeed,
but if you try to request the row you don't get a result.

If you try to insert a row that has been recently deleted, and has an
active tombstone I would expect either the tombstone marker to be
removed, or the insert to fail. It seems to currently accept the
insert and then subsequently the row can't be found.