Let me clarify my question more:
Given the rf is 3, r/w cl is quorum.
Initially, the list is empty, the user appends one element into the list:
list += [foo]
Then node A is down, and the user prepends another element:
list = [bar] + list

Then A comes back, assuming the list on A is still [foo], and the list
on nodeB and nodeC is [bar, foo]

The user needs to modify the first element:
list[0] = foobar

Then what happens?

A modifies the foo to foobar, and B/C modifies bar to foobar?

Then when they are repaired, the final list version becomes:
[foobar, foobar]?


2018-04-20 21:56 GMT+08:00 DuyHai Doan <doanduy...@gmail.com>:
> The inconsistency scenario you describe can occur for sure
>
> Now repair (read repair, consistent read + weekly repair) is there to fix it
>
> "Why Cassandra do not read from cluster with somehow read CL before
> updating the list?"
>
> Because read-before-write on the cluster level is an anti-pattern.
>
> The read-before-write at local storage is somehow already an anti-pattern.
> That's why it's recommended to avoid using list as much as possible
>
>
>
>
> On Fri, Apr 20, 2018 at 1:01 PM, Jinhua Luo <luajit...@gmail.com> wrote:
>>
>> Do you confirm it just reads the local storage? If so, I have a question:
>>
>> Think that, the user reads the list using QUORUM CL, e.g. the value is
>> {a,b,c}, then, it wants to set the second item b.
>> It sends such write request to some coordinator, but that coordinator
>> has outdated version in its local storage,
>> let's say it's {a,d}, then the item to set finally is not b but d,
>> which is unexpected from the perspective of the previous read.
>>
>> Why Cassandra do not read from cluster with somehow read CL before
>> updating the list?
>>
>>
>> 2018-04-20 16:12 GMT+08:00 DuyHai Doan <doanduy...@gmail.com>:
>> > The read operation on the list column is done locally on each replica so
>> > replication factor does not really apply here
>> >
>> > On Fri, Apr 20, 2018 at 7:37 AM, Jinhua Luo <luajit...@gmail.com> wrote:
>> >>
>> >> Hi All,
>> >>
>> >> Some list operations, like set by index, needs to read the whole list
>> >> before update.
>> >> So what's the read consistency level of that read? Use the same cl of
>> >> the setting for the normal read?
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
>> >> For additional commands, e-mail: user-h...@cassandra.apache.org
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
>> For additional commands, e-mail: user-h...@cassandra.apache.org
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
For additional commands, e-mail: user-h...@cassandra.apache.org

Reply via email to