-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#16912] DocDB: Expose GetOldTransactions RPC to fetch long-running t…
…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
- Loading branch information
1 parent
3c2b229
commit 320cffb
Showing
11 changed files
with
494 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.