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] Expose RPC endpoint to fetch long-running transactions from transaction coordinator #16912
Closed
1 task done
Labels
area/docdb
YugabyteDB core features
kind/enhancement
This is an enhancement of an existing feature
priority/medium
Medium priority issue
Projects
Comments
robertsami
added
area/docdb
YugabyteDB core features
status/awaiting-triage
Issue awaiting triage
labels
Apr 18, 2023
yugabyte-ci
added
kind/bug
This issue is a bug
priority/medium
Medium priority issue
labels
Apr 18, 2023
robertsami
moved this from Needs Triage
to On-By-Default Blocking
in Wait-Queue Based Locking
Apr 18, 2023
This was referenced Apr 18, 2023
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
moved this from On-By-Default Blocking
to GA Blocking
in Wait-Queue Based Locking
May 4, 2023
robertsami
added a commit
that referenced
this issue
Jun 21, 2023
…ransaction metadata Summary: This revision adds a GetOldTransactions endpoint at the tserver. This endpoint allows fetching the oldest transactions at a given status tablet, along with associated metadata such as involved tablets and aborted subtransactions which will be required when fetching lock statuses for these transactions in pg_locks. The RPC returns only those transactions which are older than a specified minimum age, and optionally at most a specified max number of transactions (prioritizing the oldest first). A few changes needed to be made to support this endpoint: 1. The client needs to report involved tablets to the coordinator during heartbeat even if the transaction is pending. Previously we would only report these tablets on commit. This behavior can be turned off using the new flag `--disable_heartbeat_send_involved_tablets`, which is included in this revision as a precautionary measure 2. We index managed transactions in the coordinator by a new first_touch field, which stores the start time of the transaction reported by the client Test Plan: `ybd --cxx-test pgwrapper_pg_old_txn-test` Reviewers: bkolagani, pjain, esheng, sergei Reviewed By: bkolagani, esheng Subscribers: bogdan Differential Revision: https://phorge.dev.yugabyte.com/D25351
robertsami
added a commit
that referenced
this issue
Jun 21, 2023
… long-running transaction metadata Summary: Original commit: 320cffb / D25351 This revision adds a GetOldTransactions endpoint at the tserver. This endpoint allows fetching the oldest transactions at a given status tablet, along with associated metadata such as involved tablets and aborted subtransactions which will be required when fetching lock statuses for these transactions in pg_locks. The RPC returns only those transactions which are older than a specified minimum age, and optionally at most a specified max number of transactions (prioritizing the oldest first). A few changes needed to be made to support this endpoint: 1. The client needs to report involved tablets to the coordinator during heartbeat even if the transaction is pending. Previously we would only report these tablets on commit. This behavior can be turned off using the new flag `--disable_heartbeat_send_involved_tablets`, which is included in this revision as a precautionary measure 2. We index managed transactions in the coordinator by a new first_touch field, which stores the start time of the transaction reported by the client Jira: DB-6241 Test Plan: `ybd --cxx-test pgwrapper_pg_old_txn-test` Reviewers: bkolagani, pjain, esheng, sergei Reviewed By: bkolagani Subscribers: bogdan Differential Revision: https://phorge.dev.yugabyte.com/D26319
dr0pdb
pushed a commit
to dr0pdb/yugabyte-db
that referenced
this issue
Jul 6, 2023
…unning transaction metadata Summary: This revision adds a GetOldTransactions endpoint at the tserver. This endpoint allows fetching the oldest transactions at a given status tablet, along with associated metadata such as involved tablets and aborted subtransactions which will be required when fetching lock statuses for these transactions in pg_locks. The RPC returns only those transactions which are older than a specified minimum age, and optionally at most a specified max number of transactions (prioritizing the oldest first). A few changes needed to be made to support this endpoint: 1. The client needs to report involved tablets to the coordinator during heartbeat even if the transaction is pending. Previously we would only report these tablets on commit. This behavior can be turned off using the new flag `--disable_heartbeat_send_involved_tablets`, which is included in this revision as a precautionary measure 2. We index managed transactions in the coordinator by a new first_touch field, which stores the start time of the transaction reported by the client Test Plan: `ybd --cxx-test pgwrapper_pg_old_txn-test` Reviewers: bkolagani, pjain, esheng, sergei Reviewed By: bkolagani, esheng Subscribers: bogdan Differential Revision: https://phorge.dev.yugabyte.com/D25351
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
Jira Link: DB-6241
Description
Expose new RPC endpoint to fetch transactions and their involved tablets based on:
We may need to start persisting txn start time when we send the first heartbeat after taking the txn if we do not already. It may also be good enough to just store this in memory at the coordinator.
This will be the endpoint hit in the first step of
pg_client_service
's GetLockStatusWarning: Please confirm that this issue does not contain any sensitive information
The text was updated successfully, but these errors were encountered: