LWT uses the coordinator’s machine’s timestamp to generate a timeuuid, which is 
used as the timestamp of the paxos ballot.  You cannot supply a paxos ballot 
that’s behind the current time because it’s invalid.

You’re issuing multiple updates within a few ms in a distributed system, it 
sounds like you’re trying to ignore the real world problem of clock variance.  
If you understand that you’ve got clocks that are going to be more than 10ms 
off, and you’re issuing queries within a few ms of each other, why do you think 
that your custom supplied timestamps are going to be correct?  


> On Nov 16, 2015, at 1:01 PM, Peddi, Praveen <pe...@amazon.com> wrote:
> 
> We have some rapid fire updates (multiple updates with in few millis). I wish 
> we had control over ntp drifts but AWS doesn’t guarantee “0 drift”. In North 
> America, its minimal (<5 to 10 ms) but Europe has longer drifts. We override 
> the timestamp only if we see current timestamp on the row is in future. Why 
> do you think overriding timestamp is a work around? It seems like a valid 
> reason to override timestamps. 
> 
> Thanks
> Praveen
> 
> 
> From: Jon Haddad <jonathan.had...@gmail.com 
> <mailto:jonathan.had...@gmail.com>> on behalf of Jon Haddad 
> <j...@jonhaddad.com <mailto:j...@jonhaddad.com>>
> Reply-To: "user@cassandra.apache.org <mailto:user@cassandra.apache.org>" 
> <user@cassandra.apache.org <mailto:user@cassandra.apache.org>>
> Date: Monday, November 16, 2015 at 3:42 PM
> To: "user@cassandra.apache.org <mailto:user@cassandra.apache.org>" 
> <user@cassandra.apache.org <mailto:user@cassandra.apache.org>>
> Subject: Re: Overriding timestamp with light weight transactions
> 
> Perhaps you should fix your clock drift issues instead of trying to use a 
> workaround?
> 
>> On Nov 16, 2015, at 11:39 AM, Peddi, Praveen <pe...@amazon.com 
>> <mailto:pe...@amazon.com>> wrote:
>> 
>> Hi,
>> We are using Cassandra 2.0.9 and we currently have “using timestamp” clause 
>> in all our update queries. We did this to fix occasional issues with ntp 
>> drift on AWS. We recently introduced conditional update in couple of our API 
>> and we realized that I can’t have “using timestamp” and “if column1=?” in 
>> the same query.
>> 
>> com.datastax.driver.core.exceptions.InvalidQueryException: Cannot provide 
>> custom timestamp for conditional update
>> 
>> How do I achieve this if I want to override timestamp in a query with 
>> conditional update? Also, does anyone know the reason behind not supporting 
>> “using timestamp” for conditional update? I am trying to understand the 
>> problems this would cause.
>> 
>> Thanks
>> Praveen
> 

Reply via email to