You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently for index scan and parallel scan, a consistent read point is not enforced. That results in an index scan having different read time on each page, which might cause one to read a partial update of a transaction (similar to the issue in #10328).
Example
CREATE TABLE t (k int primary key, v1 int, v2 int) WITH transactions = "
"{ 'enabled' : true };
INSERT INTO t (k, v1, v2) VALUES (0, 0, 20000);
INSERT INTO t (k, v1, v2) VALUES (1, 0, 0);
CREATE INDEX idx ON t(v1);
Now on two ycqlsh shells, execute the following concurrently:
ycqlsh1> BEGIN TRANSACTION
... update t set v2 = v2 - 10 where k = 0;
... update t set v2 = v2 - 10 where k = 1;
... insert into t (k, v1, v2) values (2, 0, 10) if not exists else error;
... insert into t (k, v1, v2) values (3, 0, 10) if not exists else error;
... END TRANSACTION;
ycqlsh2> paging 1;
ycqlsh2>
explain select (k, v1, v2) from t where v1 = 0;
QUERY PLAN
-----------------------------------------------------------
Index Scan using ybdemo_keyspace.idx on ybdemo_keyspace.t
Key Conditions: (v1 = 0)
ycqlsh2> select k, v1, v2 from t where v1 = 0;
Jira Link: DB-3098
Description
Currently for index scan and parallel scan, a consistent read point is not enforced. That results in an index scan having different read time on each page, which might cause one to read a partial update of a transaction (similar to the issue in #10328).
Example
Now on two ycqlsh shells, execute the following concurrently:
The result would be
which is wrong.
The text was updated successfully, but these errors were encountered: