cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peer, Oded" <Oded.P...@rsa.com>
Subject RE: Insert Vs Updates - Both create tombstones
Date Thu, 14 May 2015 10:11:35 GMT
If this how you update then you are not creating tombstones.

If you used UPDATE it’s the same behavior. You are simply inserting a new value for the
cell which does not create a tombstone.
When you modify data by using either the INSERT or the UPDATE command the value is stored
along with a timestamp indicating the timestamp of the value.
Assume timestamp T1 is before T2 (T1 < T2) and you stored value V2 with timestamp T2. Then
you store V1 with timestamp T1.
Now you have two values of V in the DB: <V2,T2>, <V1,T1>
When you read the value of V from the DB you read both <V2,T2>, <V1,T1>, which
may be in different sstables, Cassandra resolves the conflict by comparing the timestamp and
returns V2.
Compaction will later take care and remove <V1,T1> from the DB.


From: Walsh, Stephen [mailto:Stephen.Walsh@Aspect.com]
Sent: Thursday, May 14, 2015 11:39 AM
To: user@cassandra.apache.org
Subject: RE: Insert Vs Updates - Both create tombstones

Thank you,

We are updating the entire row (all columns) each second via the “insert” command.
So if we did updates – no tombstones would be created?
But because we are doing inserts- we are creating tombstones for each column each insert?


From: Ali Akhtar [mailto:ali.rac200@gmail.com]
Sent: 13 May 2015 12:10
To: user@cassandra.apache.org<mailto:user@cassandra.apache.org>
Subject: Re: Insert Vs Updates - Both create tombstones

Sorry, wrong thread. Disregard the above

On Wed, May 13, 2015 at 4:08 PM, Ali Akhtar <ali.rac200@gmail.com<mailto:ali.rac200@gmail.com>>
wrote:
If specifying 'using' timestamp, the docs say to provide microseconds, but where are these
microseconds obtained from? I have regular java.util.Date objects, I can get the time in milliseconds
(i.e the unix timestamp), how would I convert that to microseconds?

On Wed, May 13, 2015 at 3:45 PM, Peer, Oded <Oded.Peer@rsa.com<mailto:Oded.Peer@rsa.com>>
wrote:
Under the assumption that when you update the columns you also update the TTL for the columns
then a tombstone won’t be created for those columns.
Remember that TTL is set on columns (or “cells”), not on rows, so your description of
updating a row is slightly misleading. If every query updates different columns then different
columns might expire at different times.

From: Walsh, Stephen [mailto:Stephen.Walsh@Aspect.com<mailto:Stephen.Walsh@Aspect.com>]
Sent: Wednesday, May 13, 2015 1:35 PM
To: user@cassandra.apache.org<mailto:user@cassandra.apache.org>
Subject: Insert Vs Updates - Both create tombstones

Quick Question,

Our team is under much debate, we are trying to find out if an Update on a row with a TTL
will create a tombstone.

E.G

We have one row with a TTL, if we keep “updating” that row before the TTL is hit, will
a tombstone be created.
I believe it will, but want to confirm.

So if that’s is  true,
And if our TTL is 10 seconds and we “update” the row every second, will 10 tombstones
be created after 10 seconds? Or just 1?
(and does the same apply for “insert”)

Regards
Stephen Walsh


This email (including any attachments) is proprietary to Aspect Software, Inc. and may contain
information that is confidential. If you have received this message in error, please do not
read, copy or forward this message. Please notify the sender immediately, delete it from your
system and destroy any copies. You may not further disclose or distribute this email or its
attachments.


This email (including any attachments) is proprietary to Aspect Software, Inc. and may contain
information that is confidential. If you have received this message in error, please do not
read, copy or forward this message. Please notify the sender immediately, delete it from your
system and destroy any copies. You may not further disclose or distribute this email or its
attachments.
Mime
View raw message