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

[DocDB] Use GetTransactionStatus RPC in pg_client_service for yb_lock_status calls to specific transaction #16913

Open
1 task done
Tracked by #18901
robertsami opened this issue Apr 18, 2023 · 0 comments
Assignees
Labels
area/docdb YugabyteDB core features kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@robertsami
Copy link
Contributor

robertsami commented Apr 18, 2023

Jira Link: DB-6242

Description

In case we are processing a GetLockStatus request at pg_client_service restricted to a single transaction_id, we need only call GetLockStatus before determining which tablets to query, as long as GetLockStatus can return the involved tablets. We should augment this RPC to include a flag causing the response to include the transactions involved tablets. We should also pipe the aborted_subtxn_set from this call to the eventual GetLockStatus RPCs we send to tservers

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

  • I confirm this issue does not contain any sensitive information.
@robertsami robertsami added area/docdb YugabyteDB core features status/awaiting-triage Issue awaiting triage labels Apr 18, 2023
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Apr 18, 2023
@robertsami robertsami self-assigned this Apr 18, 2023
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature and removed kind/bug This issue is a bug status/awaiting-triage Issue awaiting triage labels Apr 18, 2023
@robertsami robertsami assigned basavaraj29 and unassigned robertsami Jun 26, 2023
basavaraj29 added a commit that referenced this issue Jul 19, 2023
Summary:
`GetLockStatus` in pg_client_service.cc returns lock info of either old transactions (older than `min_txn_age`) or the specified transaction set.

For the former case, this diff augments the response by including host node uuid of the involved transactions whose lock info is being returned. We include the node uuid in the transaction heartbeats sent from the query layer and make the txn coordinator store the host node uuid. We return the host node info from the coordinator when queried for old transactions. The query layer parses this info and populates `PgGetLockStatusResponsePB` resp with host node uuids of involved transactions.

When the incoming `PgGetLockStatusRequestPB` contains a transaction id, we directly broadcast get lock status request to all tservers skipping the coordinator. Since we skip the coordinator, we don't get the host node info. This will be addressed as part of #16913
Jira: DB-7013

Test Plan:
./yb_build.sh --cxx-test pgwrapper_pg_get_lock_status-test --gtest_filter PgGetLockStatusTest.TestGetLockStatusOfOldTxns
./yb_build.sh --cxx-test pgwrapper_pg_get_lock_status-test --gtest_filter PgGetLockStatusTest.TestGetLockStatusLimitNumOldTxns

Reviewers: rsami

Reviewed By: rsami

Subscribers: ybase, bogdan

Differential Revision: https://phorge.dev.yugabyte.com/D26957
@robertsami robertsami changed the title [DocDB] Augment GetTransactionStatus RPC to optionally include a transactions' involved tablets [DocDB] Use GetTransactionStatus RPC in pg_client_service for yb_lock_status calls to specific transaction Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
Status: Pending
Development

No branches or pull requests

3 participants