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

[dst] Fix wait_queue handling of single tablet transactions #14014

Closed
robertsami opened this issue Sep 14, 2022 · 1 comment
Closed

[dst] Fix wait_queue handling of single tablet transactions #14014

robertsami opened this issue Sep 14, 2022 · 1 comment
Assignees

Comments

@robertsami
Copy link
Contributor

We currently do not properly handle the case where multiple transactions are waiting at the same tablet

@robertsami robertsami self-assigned this Sep 14, 2022
robertsami added a commit that referenced this issue Sep 20, 2022
…wait queue

Summary:
Prior to this revision, if two single tablet transactions arrived to the same WaitQueue instance, we
would try to store their WaiterData info in a map indexed by transaction ID, which for these
transactions was always Nil. Therefore we would overwrite the previous WaiterData each time and the
overwritten waiters would fail.

This revision improves the handling of single tablet waiters to handle multiple single tablet
waiters at the same tablet. We periodically send a retryable error to the client of a waiting single
tablet transaction to ensure we do not continue tracking these operations indefinitely in case the
client fails. Live clients will receive this status after FLAGS_force_single_shard_waiter_retry_ms
and will resend the request to the tablet..

Test Plan:
ybd --cxx-test pgwrapper_pg_pessimistic_locking-test
ybd --java-test org.yb.pgsql.TestPgPessimisticLockingRegress

Reviewers: sergei, pjain

Reviewed By: pjain

Subscribers: mbautin

Differential Revision: https://phabricator.dev.yugabyte.com/D19553
@robertsami robertsami added this to To do in Wait-Queue Based Locking via automation Dec 8, 2022
@robertsami robertsami moved this from To do to Done in Wait-Queue Based Locking Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

1 participant