incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Lebresne <sylv...@yakaz.com>
Subject Re: Preventing an update of a CF row
Date Tue, 19 Oct 2010 07:43:31 GMT
> Always specify some constant value for timestamp. Only 1st insertion with that
> timestamp will succeed. Others will be ignored, because will be considered
> duplicates by cassandra.

Well, that's not entirely true. When cassandra 'resolves' two columns
having the
same timestamp, it will compare the values to decide which one to keep
(and it'll
keep the one column whose value is greater for bytes comparison).
Concretely, if you insert Column('foo', 'b', 0) and then Column('foo',
'bar', 0), then
you'll end up with the second column, even though the timestamps are the same
because 'bar' > 'b'.
So constant timestamps doesn't work for preventing updates of a given column.

--
Sylvain

Mime
View raw message