lp://staging/~jaypipes/drizzle/xa-transaction-log
- Get this branch:
- bzr branch lp://staging/~jaypipes/drizzle/xa-transaction-log
Branch merges
- Jay Pipes (community): Needs Resubmitting
- Brian Aker: Pending requested
-
Diff: 2554 lines (+1736/-144)31 files modifieddrizzled/cursor.cc (+1/-2)
drizzled/plugin/xa_resource_manager.h (+4/-2)
drizzled/transaction_services.cc (+187/-58)
drizzled/transaction_services.h (+67/-0)
drizzled/xid.h (+1/-1)
plugin/innobase/handler/ha_innodb.cc (+1/-4)
plugin/transaction_log/module.cc (+104/-17)
plugin/transaction_log/plugin.ini (+2/-2)
plugin/transaction_log/tests/r/filtered_replicator.result (+4/-0)
plugin/transaction_log/tests/r/information_schema.result (+4/-1)
plugin/transaction_log/tests/r/insert.result (+4/-0)
plugin/transaction_log/tests/r/sync_method_every_write.result (+2/-0)
plugin/transaction_log/tests/r/truncate_log.result (+2/-1)
plugin/transaction_log/tests/r/udf_print_transaction_message.result (+1/-0)
plugin/transaction_log/tests/r/xa.result (+24/-0)
plugin/transaction_log/tests/r/xa_slap.result (+22/-0)
plugin/transaction_log/tests/t/insert.inc (+2/-0)
plugin/transaction_log/tests/t/xa-master.opt (+1/-0)
plugin/transaction_log/tests/t/xa.test (+12/-0)
plugin/transaction_log/tests/t/xa_slap-master.opt (+1/-0)
plugin/transaction_log/tests/t/xa_slap.test (+36/-0)
plugin/transaction_log/transaction_log.cc (+52/-7)
plugin/transaction_log/transaction_log.h (+48/-7)
plugin/transaction_log/transaction_log_applier.cc (+9/-39)
plugin/transaction_log/transaction_log_applier.h (+1/-3)
plugin/transaction_log/undo_log.cc (+322/-0)
plugin/transaction_log/undo_log.h (+184/-0)
plugin/transaction_log/undo_log_index.cc (+77/-0)
plugin/transaction_log/undo_log_index.h (+114/-0)
plugin/transaction_log/xa_resource_manager.cc (+276/-0)
plugin/transaction_log/xa_resource_manager.h (+171/-0)
Recent revisions
- 1318. By Jay Pipes <jpipes@serialcoder>
-
Fixes a reference-
to-reference issue with STL implementations on FreeBSD and CentOS by unrolling a for_each() call. Big thanks to Eric for the help. - 1312. By Jay Pipes <jpipes@serialcoder>
-
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::XaResourceMana ger. 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)
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp://staging/~drizzle-trunk/drizzle/development