You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by "Sávio S. Teles de Oliveira" <sa...@cuia.com.br> on 2014/09/17 20:55:25 UTC

Concurrents deletes and updates

I'm using the Cassandra 2.0.9 with JAVA datastax driver.
I'm running the tests in a cluster with 3 nodes, RF=3 and CL=ALL for each
operation.

I have a Column family filled with some keys (for example 'a' and 'b').
When this keys are deleted and inserted hereafter, sporadically this keys
disappear.

Is it a bug on Cassandra or on Datastax driver?
Any suggestions?

Tks

Re: Concurrents deletes and updates

Posted by Jan Algermissen <ja...@nordsc.com>.
On 17 Sep 2014, at 20:55, Sávio S. Teles de Oliveira <sa...@cuia.com.br> wrote:

> I'm using the Cassandra 2.0.9 with JAVA datastax driver.
> I'm running the tests in a cluster with 3 nodes, RF=3 and CL=ALL for each operation.
> 
> I have a Column family filled with some keys (for example 'a' and 'b').
> When this keys are deleted and inserted hereafter, sporadically this keys disappear. 

Could it be that the delete and insert have the same timestamp? Are you using batched queries maybe? In my current project a team experienced similar behavior during automated tests

If you delete with T1 and insert with T1 the delete wins, which was the reason in our case.

You might want to test this with client provided timestamps and make sure the insert has a T_insert > T_delete

Jan




> 
> Is it a bug on Cassandra or on Datastax driver?
> Any suggestions?
> 
> Tks


Re: Concurrents deletes and updates

Posted by Tyler Hobbs <ty...@datastax.com>.
Perhaps you're seeing this:
https://issues.apache.org/jira/browse/CASSANDRA-6178

TL;DR: rapid deletes and inserts of the same key may use the same
timestamp, in which case the delete wins.  Specifying the timestamp
explicitly in the CQL query is a good workaround.  Alternatively, other
drivers which have better timestamp precision (Java only has millisecond
precision before Java 8) and can use the v3 protocol (Cassandra 2.1+) can
automatically provide better client-side timestamps.

On Wed, Sep 17, 2014 at 2:59 PM, Sávio S. Teles de Oliveira <
savio.teles@cuia.com.br> wrote:

> Philip, I'm not using "IF NOT EXISTS" on insert command.
>
> 2014-09-17 16:51 GMT-03:00 Sávio S. Teles de Oliveira <
> savio.teles@cuia.com.br>:
>
> The clocks are synced.
>>
>> Could you be experiencing
>>> https://issues.apache.org/jira/browse/CASSANDRA-7801 ?
>>
>>
>> Yes, its similar Philip. How can I solve this problem?
>>
>> 2014-09-17 16:16 GMT-03:00 Philip Thompson <ph...@datastax.com>
>> :
>>
>> Could you be experiencing
>>> https://issues.apache.org/jira/browse/CASSANDRA-7801 ?
>>>
>>> On Wed, Sep 17, 2014 at 2:09 PM, Jonathan Haddad <jo...@jonhaddad.com>
>>> wrote:
>>>
>>>> Make sure your clocks are synced.  If they aren't, the writetime that
>>>> determines the most recent value will be incorrect.
>>>>
>>>> On Wed, Sep 17, 2014 at 11:58 AM, Robert Coli <rc...@eventbrite.com>
>>>> wrote:
>>>> > On Wed, Sep 17, 2014 at 11:55 AM, Sávio S. Teles de Oliveira
>>>> > <sa...@cuia.com.br> wrote:
>>>> >>
>>>> >> I'm using the Cassandra 2.0.9 with JAVA datastax driver.
>>>> >> I'm running the tests in a cluster with 3 nodes, RF=3 and CL=ALL for
>>>> each
>>>> >> operation.
>>>> >>
>>>> >> I have a Column family filled with some keys (for example 'a' and
>>>> 'b').
>>>> >> When this keys are deleted and inserted hereafter, sporadically this
>>>> keys
>>>> >> disappear.
>>>> >>
>>>> >> Is it a bug on Cassandra or on Datastax driver?
>>>> >> Any suggestions?
>>>> >
>>>> >
>>>> > I would file a Cassandra JIRA with reproduction steps.
>>>> >
>>>> > http://issues.apache.org
>>>> >
>>>> > =Rob
>>>> > http://twitter.com/rcolidba
>>>>
>>>>
>>>>
>>>> --
>>>> Jon Haddad
>>>> http://www.rustyrazorblade.com
>>>> twitter: rustyrazorblade
>>>>
>>>
>>>
>>
>>
>> --
>> Sávio Salvarino Teles de Oliveira
>> voice: +55 62 9136 6996
>> http://br.linkedin.com/in/savioteles
>> Master in Computer Science at Federal University of Goiás
>> Software Analyst at GoGeo
>> http://www.gogeo.io/
>>
>
>
>
> --
> Sávio Salvarino Teles de Oliveira
> voice: +55 62 9136 6996
> http://br.linkedin.com/in/savioteles
> Master in Computer Science at Federal University of Goiás
> Software Analyst at GoGeo
> http://www.gogeo.io/
>



-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Re: Concurrents deletes and updates

Posted by "Sávio S. Teles de Oliveira" <sa...@cuia.com.br>.
Philip, I'm not using "IF NOT EXISTS" on insert command.

2014-09-17 16:51 GMT-03:00 Sávio S. Teles de Oliveira <
savio.teles@cuia.com.br>:

> The clocks are synced.
>
> Could you be experiencing
>> https://issues.apache.org/jira/browse/CASSANDRA-7801 ?
>
>
> Yes, its similar Philip. How can I solve this problem?
>
> 2014-09-17 16:16 GMT-03:00 Philip Thompson <ph...@datastax.com>:
>
> Could you be experiencing
>> https://issues.apache.org/jira/browse/CASSANDRA-7801 ?
>>
>> On Wed, Sep 17, 2014 at 2:09 PM, Jonathan Haddad <jo...@jonhaddad.com>
>> wrote:
>>
>>> Make sure your clocks are synced.  If they aren't, the writetime that
>>> determines the most recent value will be incorrect.
>>>
>>> On Wed, Sep 17, 2014 at 11:58 AM, Robert Coli <rc...@eventbrite.com>
>>> wrote:
>>> > On Wed, Sep 17, 2014 at 11:55 AM, Sávio S. Teles de Oliveira
>>> > <sa...@cuia.com.br> wrote:
>>> >>
>>> >> I'm using the Cassandra 2.0.9 with JAVA datastax driver.
>>> >> I'm running the tests in a cluster with 3 nodes, RF=3 and CL=ALL for
>>> each
>>> >> operation.
>>> >>
>>> >> I have a Column family filled with some keys (for example 'a' and
>>> 'b').
>>> >> When this keys are deleted and inserted hereafter, sporadically this
>>> keys
>>> >> disappear.
>>> >>
>>> >> Is it a bug on Cassandra or on Datastax driver?
>>> >> Any suggestions?
>>> >
>>> >
>>> > I would file a Cassandra JIRA with reproduction steps.
>>> >
>>> > http://issues.apache.org
>>> >
>>> > =Rob
>>> > http://twitter.com/rcolidba
>>>
>>>
>>>
>>> --
>>> Jon Haddad
>>> http://www.rustyrazorblade.com
>>> twitter: rustyrazorblade
>>>
>>
>>
>
>
> --
> Sávio Salvarino Teles de Oliveira
> voice: +55 62 9136 6996
> http://br.linkedin.com/in/savioteles
> Master in Computer Science at Federal University of Goiás
> Software Analyst at GoGeo
> http://www.gogeo.io/
>



-- 
Sávio Salvarino Teles de Oliveira
voice: +55 62 9136 6996
http://br.linkedin.com/in/savioteles
Master in Computer Science at Federal University of Goiás
Software Analyst at GoGeo
http://www.gogeo.io/

Re: Concurrents deletes and updates

Posted by "Sávio S. Teles de Oliveira" <sa...@cuia.com.br>.
The clocks are synced.

Could you be experiencing
> https://issues.apache.org/jira/browse/CASSANDRA-7801 ?


Yes, its similar Philip. How can I solve this problem?

2014-09-17 16:16 GMT-03:00 Philip Thompson <ph...@datastax.com>:

> Could you be experiencing
> https://issues.apache.org/jira/browse/CASSANDRA-7801 ?
>
> On Wed, Sep 17, 2014 at 2:09 PM, Jonathan Haddad <jo...@jonhaddad.com>
> wrote:
>
>> Make sure your clocks are synced.  If they aren't, the writetime that
>> determines the most recent value will be incorrect.
>>
>> On Wed, Sep 17, 2014 at 11:58 AM, Robert Coli <rc...@eventbrite.com>
>> wrote:
>> > On Wed, Sep 17, 2014 at 11:55 AM, Sávio S. Teles de Oliveira
>> > <sa...@cuia.com.br> wrote:
>> >>
>> >> I'm using the Cassandra 2.0.9 with JAVA datastax driver.
>> >> I'm running the tests in a cluster with 3 nodes, RF=3 and CL=ALL for
>> each
>> >> operation.
>> >>
>> >> I have a Column family filled with some keys (for example 'a' and 'b').
>> >> When this keys are deleted and inserted hereafter, sporadically this
>> keys
>> >> disappear.
>> >>
>> >> Is it a bug on Cassandra or on Datastax driver?
>> >> Any suggestions?
>> >
>> >
>> > I would file a Cassandra JIRA with reproduction steps.
>> >
>> > http://issues.apache.org
>> >
>> > =Rob
>> > http://twitter.com/rcolidba
>>
>>
>>
>> --
>> Jon Haddad
>> http://www.rustyrazorblade.com
>> twitter: rustyrazorblade
>>
>
>


-- 
Sávio Salvarino Teles de Oliveira
voice: +55 62 9136 6996
http://br.linkedin.com/in/savioteles
Master in Computer Science at Federal University of Goiás
Software Analyst at GoGeo
http://www.gogeo.io/

Re: Concurrents deletes and updates

Posted by Philip Thompson <ph...@datastax.com>.
Could you be experiencing
https://issues.apache.org/jira/browse/CASSANDRA-7801 ?

On Wed, Sep 17, 2014 at 2:09 PM, Jonathan Haddad <jo...@jonhaddad.com> wrote:

> Make sure your clocks are synced.  If they aren't, the writetime that
> determines the most recent value will be incorrect.
>
> On Wed, Sep 17, 2014 at 11:58 AM, Robert Coli <rc...@eventbrite.com>
> wrote:
> > On Wed, Sep 17, 2014 at 11:55 AM, Sávio S. Teles de Oliveira
> > <sa...@cuia.com.br> wrote:
> >>
> >> I'm using the Cassandra 2.0.9 with JAVA datastax driver.
> >> I'm running the tests in a cluster with 3 nodes, RF=3 and CL=ALL for
> each
> >> operation.
> >>
> >> I have a Column family filled with some keys (for example 'a' and 'b').
> >> When this keys are deleted and inserted hereafter, sporadically this
> keys
> >> disappear.
> >>
> >> Is it a bug on Cassandra or on Datastax driver?
> >> Any suggestions?
> >
> >
> > I would file a Cassandra JIRA with reproduction steps.
> >
> > http://issues.apache.org
> >
> > =Rob
> > http://twitter.com/rcolidba
>
>
>
> --
> Jon Haddad
> http://www.rustyrazorblade.com
> twitter: rustyrazorblade
>

Re: Concurrents deletes and updates

Posted by Jonathan Haddad <jo...@jonhaddad.com>.
Make sure your clocks are synced.  If they aren't, the writetime that
determines the most recent value will be incorrect.

On Wed, Sep 17, 2014 at 11:58 AM, Robert Coli <rc...@eventbrite.com> wrote:
> On Wed, Sep 17, 2014 at 11:55 AM, Sávio S. Teles de Oliveira
> <sa...@cuia.com.br> wrote:
>>
>> I'm using the Cassandra 2.0.9 with JAVA datastax driver.
>> I'm running the tests in a cluster with 3 nodes, RF=3 and CL=ALL for each
>> operation.
>>
>> I have a Column family filled with some keys (for example 'a' and 'b').
>> When this keys are deleted and inserted hereafter, sporadically this keys
>> disappear.
>>
>> Is it a bug on Cassandra or on Datastax driver?
>> Any suggestions?
>
>
> I would file a Cassandra JIRA with reproduction steps.
>
> http://issues.apache.org
>
> =Rob
> http://twitter.com/rcolidba



-- 
Jon Haddad
http://www.rustyrazorblade.com
twitter: rustyrazorblade

Re: Concurrents deletes and updates

Posted by Robert Coli <rc...@eventbrite.com>.
On Wed, Sep 17, 2014 at 11:55 AM, Sávio S. Teles de Oliveira <
savio.teles@cuia.com.br> wrote:

> I'm using the Cassandra 2.0.9 with JAVA datastax driver.
> I'm running the tests in a cluster with 3 nodes, RF=3 and CL=ALL for each
> operation.
>
> I have a Column family filled with some keys (for example 'a' and 'b').
> When this keys are deleted and inserted hereafter, sporadically this keys
> disappear.
>
> Is it a bug on Cassandra or on Datastax driver?
> Any suggestions?
>

I would file a Cassandra JIRA with reproduction steps.

http://issues.apache.org

=Rob
http://twitter.com/rcolidba