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][Read Committed] Transaction in Read Committed Isolation level fails with conflicts with higher priority transaction #23257

Closed
1 task done
shishir2001-yb opened this issue Jul 22, 2024 · 0 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/medium Medium priority issue qa_itest-system Bugs identified in itest-system automation QA QA filed bugs

Comments

@shishir2001-yb
Copy link

shishir2001-yb commented Jul 22, 2024

Jira Link: DB-12186

Description

Version: 2.23.0.0-b609

Currently, a transaction in Read Committed Isolation with Fail On Conflict (i.e., with Wait On Conflict off) can run into the issue described below. Ideally, we should not throw the error conflicts with higher priority transaction in RC because all transactions have the same priority.

Exception: could not serialize access due to concurrent update (yb_max_query_layer_retries set to 60 are exhausted)\nDETAIL: [Operation failed. Try again (yb/docdb/conflict_resolution.cc:93): e917b9e0-ff11-45b0-be64-f5ae3e0f2d2d conflicts with higher priority transaction: e4f67062-b3cc-49c6-bb21-a2e7fc722eb8 (transaction error 3)]\n

We have just reused the same error message for both < and = in the below snippet

      // READ COMMITTED txns require a guarantee that no txn abort it. They can handle facing a
      // kConflict due to another txn's conflicting intent, but can't handle aborts. To ensure
      // these guarantees -
      //   1. all READ COMMITTED txns are given kHighestPriority and
      //   2. a kConflict is raised even if their_priority equals our_priority.
      if (our_priority <= their_priority) {
        return MakeConflictStatus(
            our_transaction_id, transaction.id, "higher priority", GetTabletMetrics());

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.
@shishir2001-yb shishir2001-yb added area/ysql Yugabyte SQL (YSQL) QA QA filed bugs status/awaiting-triage Issue awaiting triage qa_itest-system Bugs identified in itest-system automation labels Jul 22, 2024
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Jul 22, 2024
@rthallamko3 rthallamko3 removed the status/awaiting-triage Issue awaiting triage label Aug 5, 2024
pkj415 added a commit that referenced this issue Aug 20, 2024
Summary:
Currently DocDB throws the same error string to YSQL for the following 2
situations:
(1) Transaction conflicts with a higher priority transaction.
(2) Transaction conflicts with a transaction having the same priority.

The error string is "conflicts with higher priority transaction". This
diff separates the two cases and throws "conflicts with same priority
transaction" for case (2).
Jira: DB-12186

Test Plan: Jenkins

Reviewers: patnaik.balivada

Reviewed By: patnaik.balivada

Subscribers: bkolagani, ybase, yql

Differential Revision: https://phorge.dev.yugabyte.com/D36750
jasonyb pushed a commit that referenced this issue Aug 22, 2024
Summary:
 0fa2b24 Fix table layout to utilize maximum available space (#23564)
 336d00d [PLAT-14981]Increase default slow  query length
 e5127f8 [DOC-445] TA-22935: Potential Issues with Server-side Sequence Caching in Multi-Database Clusters (#23520)
 b3389ff [#23493] xCluster: code for ensuring there's an update for every sequence in WAL
 cb26a09 [#23548] Tools: Clean-up sys-catalog-tool code
 28025f6 [docs] Visualize migration assessment updates (#23358)
 9c0de5d [#23257] YSQL: Change conflict error string for RC transactions
 507432b [#23523] docdb: retryable requests instrumentation
 e4645e5 [DOC-431] Added a note for GKE cluster docs (#23349)
 d1576c4 [PLAT-12905] Add HA Metrics Page
 02da1f0 [PLAT-14869][PLAT-14986][PLAT-14998][PLAT-15003] - ui improvements and fixes
 c149f26 [#23556] hnsw_tool command-line tool for testing HNSW index implementations
 7725f15 Add operator mode & task info to diagnostics
 e193fc6 Revert "[#23064] YSQL: pg_partman: disable p_retention_schema parameter"
 8178372 [#23513] YSQL: Simplify several functions in ybc_pggate
 22657da [#23394] CDCSDK: Prevent tserver crash on concurrent Getchanges call on same producer tablet
 90554b0 [#23179] CDCSDK: Refactor TestPgReplicationSlot for dynamic data types

Test Plan: Jenkins: rebase: pg15-cherrypicks

Reviewers: jason, tfoucher

Differential Revision: https://phorge.dev.yugabyte.com/D37453
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 qa_itest-system Bugs identified in itest-system automation QA QA filed bugs
Projects
Status: Done
Development

No branches or pull requests

5 participants