Skip to content

IGNITE-28859 Add doc section about LRT diagnostics and termination - #13339

Open
lordgarrish wants to merge 3 commits into
apache:masterfrom
lordgarrish:IGNITE-28859
Open

IGNITE-28859 Add doc section about LRT diagnostics and termination#13339
lordgarrish wants to merge 3 commits into
apache:masterfrom
lordgarrish:IGNITE-28859

Conversation

@lordgarrish

Copy link
Copy Markdown
Contributor

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

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see tab PR Check at 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.

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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

** 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's strange to bind deadlocks only to checkpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants