Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
adil246 opened this issue Mar 8, 2022 · 2 comments
Closed
Labels
area/ycql Yugabyte CQL (YCQL) kind/bug This issue is a bug priority/medium Medium priority issue

Comments

@adil246
Copy link
Contributor

adil246 commented Mar 8, 2022

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

@adil246 adil246 added the area/ycql Yugabyte CQL (YCQL) label Mar 8, 2022
@m-iancu
Copy link
Contributor

m-iancu commented Mar 8, 2022

@adil246 In the latest version the ycql_serial_operation_in_transaction_block is set to true by default (see executor.cc#L109).

It can be disabled to enable full parallelism but only if the user is sure the workload does not contain conflicting statements within one transaction.
Is this by any chance an older version where that flag did not exist or was not set to true by default? Or perhaps it is explicitly set to false through a GFlag?

@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Jun 8, 2022
@yugabyte-ci yugabyte-ci changed the title [YCQL]Statements doesn't run serially by default in YCQL transaction block [YCQL] Statements doesn't run serially by default in YCQL transaction block Oct 11, 2022
@m-iancu
Copy link
Contributor

m-iancu commented Oct 11, 2022

Closing as duplicate of #5026.

@m-iancu m-iancu closed this as completed Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ycql Yugabyte CQL (YCQL) kind/bug This issue is a bug priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

3 participants