[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cassandra-user
Subject:    Re: Column value not getting updated
From:       Jonathan Haddad <jon () jonhaddad ! com>
Date:       2015-03-31 22:16:08
Message-ID: CACUnPaCJLxOB9-unFu1OBw+WNUWSBwUz3i5DSCn9=eOpBEvFAQ () mail ! gmail ! com
[Download RAW message or body]

It's not enough to set up ntp, you're going to need to force the time to
sync.  ntp is only meant to correct for drift.

You can either use ntpdate or I think there's a flag for ntpd (that I can't
remember and am in a rush out the door) that you can use to force it to
adjust to the correct time.

On Tue, Mar 31, 2015 at 3:02 PM Saurabh Sethi <Saurabh_Sethi@symantec.com>
wrote:

> That's what I found out that the clocks were not in sync.
>
> But I have setup NTP on all 3 nodes and would expect the clocks to be in
> sync.
>
> From: Nate McCall <nate@thelastpickle.com>
> Reply-To: "user@cassandra.apache.org" <user@cassandra.apache.org>
> Date: Tuesday, March 31, 2015 at 2:50 PM
> To: Cassandra Users <user@cassandra.apache.org>
> Subject: Re: Column value not getting updated
>
> You would see that if the servers' clocks were out of sync.
>
> Make sure the time on the servers is in sync or set the client timestamps
> explicitly.
>
> On Tue, Mar 31, 2015 at 3:23 PM, Saurabh Sethi <Saurabh_Sethi@symantec.com
> > wrote:
>
>> I have written a unit test that creates a column family, inserts a row in
>> that column family and then updates the value of one of the columns.
>>
>> After updating, unit test immediately tries to read the updated value for
>> that column, but Cassandra returns the old value.
>>
>>    - I am using QueryBuilder API and not CQL directly.
>>    - I am using the consistency level of QUORUM for everything – insert,
>>    update and read.
>>    - Cassandra is running as a 3 node cluster with replication factor of
>>    3.
>>
>>
>> Anyone has any idea what is going on here?
>>
>> Thanks,
>> Saurabh
>>
>
>
>
> --
> -----------------
> Nate McCall
> Austin, TX
> @zznate
>
> Co-Founder & Sr. Technical Consultant
> Apache Cassandra Consulting
> http://www.thelastpickle.com
>

[Attachment #3 (text/html)]

<div dir="ltr">It&#39;s not enough to set up ntp, you&#39;re going to need to force \
the time to sync.   ntp is only meant to correct for drift.<br><br>You can either use \
ntpdate or I think there&#39;s a flag for ntpd (that I can&#39;t remember and am in a \
rush out the door) that you can use to force it to adjust to the correct \
time.<br></div><br><div class="gmail_quote">On Tue, Mar 31, 2015 at 3:02 PM Saurabh \
Sethi &lt;<a href="mailto:Saurabh_Sethi@symantec.com">Saurabh_Sethi@symantec.com</a>&gt; \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"> <div \
style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif"><div>That's \
what I found out that the clocks were not in sync.</div><div><br></div><div>But I \
have setup NTP on all 3 nodes and would expect the clocks to be in \
sync.</div><div><br></div><span><div \
style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium \
none;BORDER-LEFT:medium \
none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt \
solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt"><span style="font-weight:bold">From: \
</span> Nate McCall &lt;<a href="mailto:nate@thelastpickle.com" \
target="_blank">nate@thelastpickle.com</a>&gt;<br><span \
style="font-weight:bold">Reply-To: </span> &quot;<a \
href="mailto:user@cassandra.apache.org" \
target="_blank">user@cassandra.apache.org</a>&quot; &lt;<a \
href="mailto:user@cassandra.apache.org" \
target="_blank">user@cassandra.apache.org</a>&gt;<br><span \
style="font-weight:bold">Date: </span> Tuesday, March 31, 2015 at 2:50 PM<br><span \
style="font-weight:bold">To: </span> Cassandra Users &lt;<a \
href="mailto:user@cassandra.apache.org" \
target="_blank">user@cassandra.apache.org</a>&gt;<br><span \
style="font-weight:bold">Subject: </span> Re: Column value not getting \
updated<br></div></span></div><div \
style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif"><span><div><br></div><div \
dir="ltr"><div>You would see that if the servers&#39; clocks were out of sync.  \
</div><div><br></div>Make sure the time on the servers is in sync or set the client \
timestamps explicitly.  </div><div class="gmail_extra"><br><div \
class="gmail_quote">On Tue, Mar 31, 2015 at 3:23 PM, Saurabh Sethi <span \
dir="ltr">&lt;<a href="mailto:Saurabh_Sethi@symantec.com" \
target="_blank">Saurabh_Sethi@symantec.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div \
style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif"><div>I \
have written a unit test that creates a column family, inserts a row in that column \
family and then updates the value of one of the \
columns.</div><div><br></div><div>After updating, unit test immediately tries to read \
the updated value for that column, but Cassandra returns the old \
value.</div><ul><li>I am using QueryBuilder API and not CQL directly.</li><li>I am \
using the consistency level of QUORUM for everything – insert, update and \
read.</li><li>Cassandra is running as a 3 node cluster with replication factor of \
3.</li></ul><div><br></div><div>Anyone has any idea what is going on \
here?</div><div><br></div><div>Thanks,</div><div>Saurabh</div></div></blockquote></div><br><br \
clear="all"><div><br></div>-- <br><div><div dir="ltr">-----------------<br>Nate \
McCall<br>Austin, TX<br>@zznate<br><br>Co-Founder &amp; Sr. Technical \
Consultant<br>Apache Cassandra Consulting<br><a href="http://www.thelastpickle.com" \
target="_blank">http://www.thelastpickle.com</a></div></div></div></span></div></blockquote></div>




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic