Skip to content

[YCQL] Statements doesn't run serially by default in YCQL transaction block #11686

Closed
@adil246

Description

Jira Link: DB-1216

Description

In order to run operations serially in the YCQL transaction block, the _ycql_serial_operation_in_transaction_block_ variable has to be set to True, else statements within the block are not able to see changes made by previous. In the below example, when this flag is set to false, the delete statement after insert got lost.

Steps to Reproduce the issue

 curl -s `hostname -i`:9000/varz |grep ycql_serial_operation_in_transaction_block
--ycql_serial_operation_in_transaction_block=false

ycqlsh:app> begin transaction insert into t1(a,b,c) values(6,4,'b');  delete from t1 where a=6;  end transaction;
ycqlsh:app> select * from t1;

 a | b | c
---+---+---
 6 | 4 | b

(1 rows)

 ./yb-ts-cli --server_address=`hostname -i`:9100 --force set_flag ycql_serial_operation_in_transaction_block 1
 curl -s `hostname -i`:9000/varz |grep ycql_serial_operation_in_transaction_block
--ycql_serial_operation_in_transaction_block=true


ycqlsh:app> begin transaction insert into t1(a,b,c) values(6,4,'b');  delete from t1 where a=6;  end transaction;
ycqlsh:app> select * from t1;

 a | b | c
---+---+---

(0 rows)

Ref Ticket
2658

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions