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

[YSQL] Ignore txn priority bound GUCs in read committed isolation #19921

Closed
1 task done
pkj415 opened this issue Nov 10, 2023 · 0 comments
Closed
1 task done

[YSQL] Ignore txn priority bound GUCs in read committed isolation #19921

pkj415 opened this issue Nov 10, 2023 · 0 comments
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage

Comments

@pkj415
Copy link
Contributor

pkj415 commented Nov 10, 2023

Jira Link: DB-8864

Description

yb_transaction_priority_lower_bound and yb_transaction_priority_upper_bound don't make sense for read committed isolation since it provides wait-on-conflict semantics even if enable_wait_queues is set to false.

Ensure that these are ignored in RC isolation.

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@pkj415 pkj415 added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Nov 10, 2023
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Nov 10, 2023
pkj415 added a commit that referenced this issue Dec 5, 2023
…tion

Summary:
`yb_transaction_priority_lower_bound` and `yb_transaction_priority_upper_bound`
don't make sense for read committed isolation since it provides
wait-on-conflict semantics even if enable_wait_queues is set to false by
always using the kHighestPriority for all RC transactions (see
9f2cc7f for reasoning,
specifically point (2) in its commit summary).

This diff ensures that these GUCs are ignored in RC isolation. Without this diff, the
following bug can be seen:

```
Start a cluster with just the tserver gflag yb_enable_read_committed_isolation=true

create table demo (id bigint primary key, value int);
insert into demo values (123, 103);

session 1: set yb_transaction_priority_lower_bound to 0.1;
session 1: set yb_transaction_priority_upper_bound to 0.4;
session 2: set yb_transaction_priority_lower_bound to 0.6;
session 2: set yb_transaction_priority_upper_bound to 0.9;
session 1: begin transaction isolation level read committed;
session 2: begin transaction isolation level read committed;
session 1: update demo set value=1 where id=123;
<succeeds...>
session 2: update demo set value=2 where id=123;
<this succeeds as well instead of waiting!>
session 1: commit;
ERROR:  Transaction ********-****-4***-****-************ expired or aborted by a conflict: 40001
```
Jira: DB-8864

Test Plan:
./yb_build.sh release --java-test org.yb.pgsql.TestPgWithoutWaitQueuesIsolationRegress
Added yb_read_committed_insert_duplicate_key_error to yb_pg_isolation_schedule

Reviewers: tvesely, bkolagani, rsami

Reviewed By: tvesely, bkolagani

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D30114
@pkj415 pkj415 closed this as completed Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage
Projects
None yet
Development

No branches or pull requests

2 participants