1316
|
|
|
Jay Pipes |
14 years ago
|
|
|
1315
|
|
|
Jay Pipes |
14 years ago
|
|
|
1314
|
|
|
Jay Pipes |
14 years ago
|
|
|
1313
|
|
|
Jay Pipes |
14 years ago
|
|
|
1312
|
|
Initial checkin of an XA-participating transaction log.
@note
Lots of changes in this patch, and some will look a bit hackish (in the TransactionServices component) until DDL operations follow the same transactional code path as non-DDL operations. This will happen with transactional DDL.
@details
This patch adds a new "XA mode" to the transaction log module that is enabled using the new --transaction-log-enable-xa switch.
If this switch is set, the transaction log registers itself with Drizzle transaction manager (TransactionServices component) and the transaction manager call xaPrepare() and xaCommit() on the transaction log's TransactionLogResourceManager object, which is the class which implements the XA API from plugin::XaResourceManager.
In order to enable XA, the transaction log in XA mode is structured into the main transaction log, which does not change structure at all, and a scoreboard of undo logs and undo log buffers/indexes. When the transaction manager calls xaPrepare(), the transaction log writes an undo log entry containing the transaction message it will eventually write to the transaction log to one of the undo log segments.
During xaCommit(), the undo log entry is read from the undo log, the transaction message is written to the transaction log, and the undo log entry is marked as committed. The undo log entry is then removed from the in-memory undo log index. In this way, the undo log can contain entries in either PREPARED or COMMITTED state, and the transaction log can only contain messages in the COMMITTED state. If a failure occurs between the time after the transaction log entry was written and the undo log entry was marked as committed, then during recovery operations, there will be an undo log entry marked as PREPARED in the undo log, and the recovery process either decides to remove the committed transaction message from the main transaction log or mark the undo log entry as committed (this depends on the recovery heuristic)
|
Jay Pipes |
14 years ago
|
|
|
1311
|
|
|
Jay Pipes |
14 years ago
|
|
|
1310
|
|
|
Jay Pipes |
14 years ago
|
|
|
1309
|
|
|
Jay Pipes |
14 years ago
|
|
|
1308
|
|
|
Jay Pipes |
14 years ago
|
|
|
1307
|
|
|
Jay Pipes |
14 years ago
|
|
|
1306
|
|
|
Jay Pipes |
14 years ago
|
|
|
1305
|
|
|
Jay Pipes |
14 years ago
|
|
|
1304
|
|
|
Jay Pipes |
14 years ago
|
|
|
1303
|
|
|
Jay Pipes |
14 years ago
|
|
|
1302
|
|
|
Jay Pipes |
14 years ago
|
|
|
1301
|
|
|
Jay Pipes |
14 years ago
|
|
|
1300
|
|
|
Jay Pipes |
14 years ago
|
|
|
1299
|
|
|
Jay Pipes |
14 years ago
|
|
|
1298
|
|
|
Jay Pipes |
14 years ago
|
|
|
1297
|
|
|
Jay Pipes |
14 years ago
|
|
|