IGNITE-28859 Add doc section about LRT diagnostics and termination - #13339
IGNITE-28859 Add doc section about LRT diagnostics and termination#13339lordgarrish wants to merge 3 commits into
Conversation
| Rolling back a transaction using the `tx` command is only possible for the `ACTIVE`, `PREPARING`, and `PREPARED` statuses. A transaction in statuses related to the `rollback` procedure is already in the process of rolling back. Transactions in the `COMMITTING` and `COMMITTED` statuses cannot be rolled back due to 2PC protocol restrictions. | ||
|
|
||
| * First termination stage — cancelling transactions using `tx kill`. To cancel transactions, use the `control.sh` utility to minimize the impact on the cluster: | ||
| . Execute the `control.sh --tx --min-duration <transaction_timeout_in_ms>` command in the cluster. Example output: |
There was a problem hiding this comment.
--min-duration - in seconds, not ms.
| == Long Running Transactions Termination | ||
| The `tx` command of the `control.sh` utility allows you to search for transactions based on various criteria (such as ID, duration, or label) and roll back transactions. Since transactions in Apache Ignite are generally distributed (multiple nodes are involved in processing a single transaction), this command may display the same transaction as present on multiple nodes simultaneously. | ||
|
|
||
| Rolling back a transaction using the `tx` command is only possible for the `ACTIVE`, `PREPARING`, and `PREPARED` statuses. A transaction in statuses related to the `rollback` procedure is already in the process of rolling back. Transactions in the `COMMITTING` and `COMMITTED` statuses cannot be rolled back due to 2PC protocol restrictions. |
There was a problem hiding this comment.
I'm not sure we can rollback tx in PREPARED state. Can you please recheck it?
| . Extract the `xid` from all transactions across all nodes and remove duplicate `xid` values. Duplicates occur because the same transaction can exist on multiple nodes — in this case, its `xid` will appear in the command output multiple times. | ||
| . For each `xid`, run the `tx kill` command to roll back that transaction. Example call: `control.sh --tx --xid <id> --kill`. | ||
|
|
||
| * Second termination stage (optional) — restarting nodes that block transaction completion. Check if the first stage was sufficient to handle LRT: |
There was a problem hiding this comment.
It's a strange recomendation. At least it's not a normal workflow and can't be recomended as second stage, it's an exceptional situation.
| Command [TX] finished with code: 0 | ||
| ---- | ||
| . Extract the `xid` from all transactions across all nodes and remove duplicate `xid` values. Duplicates occur because the same transaction can exist on multiple nodes — in this case, its `xid` will appear in the command output multiple times. | ||
| . For each `xid`, run the `tx kill` command to roll back that transaction. Example call: `control.sh --tx --xid <id> --kill`. |
There was a problem hiding this comment.
--tx -kill can be used with --min-duration. Why we recomend to use kill txs one by one?
| . Restart this node to unblock the transaction. | ||
|
|
||
| == Causes of LRT | ||
| * High system load, which leads to slower transaction processing. Indicators: |
There was a problem hiding this comment.
** High cpu or disk utilization
** Increased latency of cache operation
?
| ** increased checkpoint duration for clusters with persistence enabled; | ||
| ** long GC pauses. | ||
| * Unstable network operation. Indicators: log messages about connection loss between nodes, socket closures, or network timeouts triggering. | ||
| * Resource-intensive operations (for example, deleting a cache that is part of a cache group). Indicators: queue growth on individual threads of the system pool and striped pool, while other threads and overall node utilization may remain low. |
There was a problem hiding this comment.
snapshots, index rebuild, rebalancing?
| ** long GC pauses. | ||
| * Unstable network operation. Indicators: log messages about connection loss between nodes, socket closures, or network timeouts triggering. | ||
| * Resource-intensive operations (for example, deleting a cache that is part of a cache group). Indicators: queue growth on individual threads of the system pool and striped pool, while other threads and overall node utilization may remain low. | ||
| * Internal Apache Ignite bugs that can lead to deadlocks. Indicators: thread dumps (`thread dump`) show threads waiting to acquire a read lock (`readLock`) or write lock (`writeLock`) during checkpoint creation; over time, the thread state does not change (stack trace remains unchanged). |
There was a problem hiding this comment.
It's strange to bind deadlocks only to checkpoint.
Thank you for submitting the pull request to the Apache Ignite.
In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:
The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summarywhereXXXX- number of JIRA issue.(see the Maintainers list)
the
green visaattached to the JIRA ticket (see tabPR Checkat TC.Bot - Instance 1 or TC.Bot - Instance 2)Notes
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.