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][PessimisticLocking] Transaction is being aborted even after deadlock resolution #14134

Closed
Karvy-yb opened this issue Sep 22, 2022 · 2 comments
Assignees
Labels
kind/bug This issue is a bug priority/low Low priority QA QA filed bugs

Comments

@Karvy-yb
Copy link

Karvy-yb commented Sep 22, 2022

Jira Link: DB-3611

Description

I observed the following error which seems very vague:
ERROR: Operation expired: Heartbeat: Transaction 63ef23f4-ec83-47a8-9e76-5f8ce634ad1a expired or aborted by a conflict: 40001

Steps to reproduce:

  1. Create a table with min 3 rows in it.
  2. Explicit lock the R1 in T1; R2 in T2; R3 in T3
  3. Try accessing R3 in T1; R1 in T2; R2 in T3
  4. T3 will be aborted immediately due to deadlock with error ERROR: Internal error: Transaction 06b6b2db-e3f2-41c0-b14d-57bbada4b5ce was aborted while waiting for locks
  5. After that the locks would be released and wit will be over for T1 & T2
  6. Wait for some time and try to commit T1/T2
  7. This will throw the above mentioned error.

The error doesn't clearly mention the reason why transaction got aborted and is a little vague. From my observation, it is because of the wait time in step 6 as I didn't face this issue when I commit the transactions as soon as the waiting command gets executed. There are a couple of issues here:

  1. We shouldn't be aborting >1 transactions during deadlock as the transaction leading to deadlock is being aborted immediately, leading to no deadlock after that. So, no more transactions should be aborted.
  2. The error thrown for the later transaction (in step 7) abortion is not very specific as to why was that particular transaction aborted. The error message needs to be improved.
@Karvy-yb Karvy-yb added kind/bug This issue is a bug area/ysql Yugabyte SQL (YSQL) priority/low Low priority QA QA filed bugs status/awaiting-triage Issue awaiting triage labels Sep 22, 2022
@Karvy-yb Karvy-yb assigned Karvy-yb and rthallamko3 and unassigned Karvy-yb Sep 22, 2022
@Karvy-yb
Copy link
Author

Discussed this with @robertsami and @pkj415 over slack who said that this fix is not very simple and would take time. Thus logging a low priority bug.

@yugabyte-ci yugabyte-ci removed the status/awaiting-triage Issue awaiting triage label Sep 22, 2022
@robertsami
Copy link
Contributor

I created #14165 to track issue 1., and issue 2. is covered by #14114, so closing this one

@yugabyte-ci yugabyte-ci removed the area/ysql Yugabyte SQL (YSQL) label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This issue is a bug priority/low Low priority QA QA filed bugs
Projects
None yet
Development

No branches or pull requests

4 participants