Heuristic Recovery with the Transaction Coordinator Log

You are viewing an old version of this article. View the current version here.

The transaction coordinator log (tc_log) is used to coordinate transactions that affect multiple XA-capable storage engines. One of the main purposes of this log is in crash recovery.

Modes of Heuristic Recovery

There are three modes are heuristic recovery:

  • Automatic heuristic recovery after a crash.
  • Manual heuristic recovery when --tc-heuristic-recover is set.
  • No heuristic recovery.

Manual Heuristic Recovery

Manual heuristic recovery occurs when --tc-heuristic-recover is set. This might be needed if the server finds prepared transactions during crash recovery that are not in the transaction coordinator log. For example, you might see an error like this:

[ERROR] Found 1 prepared transactions! It means that mysqld was not shut down properly last time and critical recovery information (last binlog or tc.log file) was manually deleted after a crash. You have to start mysqld with --tc-heuristic-recover switch to commit or rollback pending transactions.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.