cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Krupitskiy (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-13130) Strange result of several list updates in a single request
Date Thu, 16 Feb 2017 19:46:42 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-13130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15870591#comment-15870591
] 

Mikhail Krupitskiy edited comment on CASSANDRA-13130 at 2/16/17 7:46 PM:
-------------------------------------------------------------------------

{quote}When you issue a single query with two updates, the two updates are actually having
the same timestamp which means that the update with the higher value will win.{quote}
Could you please clarify what does "the higher value will win" mean?
Does it mean that it's not defined which of two updates will be actually applied?


was (Author: mkrupits_jb):
>>  When you issue a single query with two updates, the two updates are actually having
the same timestamp which means that the update with the higher value will win.
Could you please clarify what does "the higher value will win" mean?
Does it mean that it's not defined which of two updates will be actually applied?

> Strange result of several list updates in a single request
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-13130
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13130
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Mikhail Krupitskiy
>            Assignee: Benjamin Lerer
>            Priority: Trivial
>
> Let's assume that we have a row with the 'listColumn' column and value \{1,2,3,4\}.
> For me it looks logical to expect that the following two pieces of code will ends up
with the same result but it isn't so.
> Code1:
> {code}
> UPDATE t SET listColumn[2] = 7, listColumn[2] = 8  WHERE id = 1;
> {code}
> Expected result: listColumn=\{1,2,8,4\} 
> Actual result: listColumn=\{1,2,7,8,4\}
> Code2:
> {code}
> UPDATE t SET listColumn[2] = 7  WHERE id = 1;
> UPDATE t SET listColumn[2] = 8  WHERE id = 1;
> {code}
> Expected result: listColumn=\{1,2,8,4\} 
> Actual result: listColumn=\{1,2,8,4\}
> So the question is why Code1 and Code2 give different results?
> Looks like Code1 should give the same result as Code2.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message