3 ms·
I don't know much about CAP but it doesn't sound right to me. Let's see, you store your data tuple for example for a position say {X,Y} as 2 coordinates. X in
by rdtsc 13y ago
I don't know much about CAP but it doesn't sound right to me.
Let's see, you store your data tuple for example for a position say {X,Y} as 2 coordinates. X in one column and Y in another one.
Now when it gets updated concurrently and it needs to merge two conflicting {X1,Y1} and {X2,Y2} positions you could end up instead with {X1,Y2} non-existing/impossible/broken position.
Is that really that easily broken? Or am I not thinking about it straight.
- gigq 13y agoIt wasn't really mentioned in the article but if you do both {X1,Y1} and {X2,Y2} as full row updates then no you can't end up with a mixed row. http://www.datastax.com/dev/blog/row-level-isolation http://www.datastax.com/dev/blog/row-level-isolation
- brown9-2 13y agoIn Cassandra the second update agreed upon by the cluster would "win", so either (X1,Y1) or (X2,Y2). Since there is no clock mechanism there is no way for the cluster to see that the data has changed since the requester decided it wanted to update the value.
- rdtsc 13y agoBut didn't the article say that last update to column wins. To me it seems if X and Y values are in different columns you would end up with invalid data. Someone else (a sibling comment) pointed me out to row level locks. That is what I was wondering about. I am looking at that at the moment.
- aphyr 13y agoRows are not isolated. You might see (X1, Y1), (X1, Y2), (X2, Y1), or (X2, Y2) if timestamps happen to conflict. https://gist.github.com/aphyr/6402464 https://gist.github.com/aphyr/6402464
- brown9-2 13y agoOh wow, that is bad. I was assuming that guarantee of row isolation was valid.