You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Stepan Pilschikov (JIRA)" <ji...@apache.org> on 2018/08/30 07:39:00 UTC

[jira] [Created] (IGNITE-9427) SQL MVCC: old data read after parallel update with autoCommit=false

Stepan Pilschikov created IGNITE-9427:
-----------------------------------------

             Summary: SQL MVCC: old data read after parallel update with autoCommit=false 
                 Key: IGNITE-9427
                 URL: https://issues.apache.org/jira/browse/IGNITE-9427
             Project: Ignite
          Issue Type: Bug
          Components: mvcc
    Affects Versions: 2.5
            Reporter: Stepan Pilschikov


Second user don't seeing first user update right after select before commit

Table:
{code:sql}create table test(id int, field_int int, field_var varchar(50), primary key (id, field_int)) with "template=replicated, ATOMICITY=TRANSACTIONAL{code}
With one row of data:
{code:sql}insert into test(id, field_int, field_var) values (1, 1, 'test_1'){code}

With two connections to sqlline
{code}sqlline.sh --autoCommit=false --color=true --outputFormat=csv --showNestedErrs=true --showWarnings=true --verbose=true -u jdbc:ignite:thin://127.0.0.1:10800 {code}
for *user_1* and *user_2*

*user_1*:
 {code:sql}
begin transaction;
select * from test where id = 1 for update;
{code}
*user_2*:
{code:sql}
update test set field_var = 'updated' where id = 1; - transaction get locked
{code}
*user_1*:
{code:sql}
commit;
select * from test; - 1, 1, 'test_1'
{code}
*user_2*:
{code:sql}
1 row affected
commit;
select * from test; - 1, 1, 'updated'
{code}
*user_1*:
{code:sql}
select * from test; - 1, 1, 'test_1' <---- should be 'updated'
{code}

if *user_1* do commit then he will be seeing update



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)