📄 intro.so
字号:
m4_comment([$Id: intro.so,v 10.7 2006/11/13 18:05:06 bostic Exp $])m4_ref_title(Distributed Transactions, Introduction to distributed transactions, [Distributed Transactions, Resource Manager], rep/ex_rq, xa/build)m4_p([dnlm4_db provides support for distributed transactions using a two-phasecommit protocol via its m4_ref(txn_prepare) and m4_ref(txn_recover)interfaces. The m4_refT(txn_prepare) performs the first phase of atwo-phase commit, flushing the log to disk, and associating a globaltransaction ID with the underlying m4_db transaction. This globaltransaction ID should be used by the global transaction manager toidentify the m4_db transaction, and will be returned by them4_refT(txn_recover) when it is called during recovery.])m4_p([dnlDistributed transactions are necessary whenever an application wants totransaction-protect data in multiple m4_db environments, even if thoseenvironments are on the same machine. However, m4_db does not performdistributed deadlock detection, therefore it is the responsibility ofthe application to ensure that accesses in different environments cannotdeadlock (this can be accomplished through careful ordering ofoperations to the multiple environments), or by using them4_ref(DB_LOCK_NOWAIT) option and eventually abort transactions thathave been waiting "too long" (where "too long" is determined by anapplication-specific timeout).])m4_p([dnlIn order to use the two-phase commit feature of m4_db, an applicationmust either implement its own global transaction manager or use anXA-compliant transaction manager (as m4_db can act as an XA-compliantresource manager).])m4_p([dnlWhen using distributed transactions, there is no way to performhot backups of multiple environments and guarantee that the backupsare global-transaction-consistent across these multiple environments.If backups are desired, then all write transactions should be suspended;that is, active write transactions must be allowed to complete and nonew write transactions should be begun. Once there are no active writetransactions, the logs may be copied for backup purposes and the backupwill be consistent across the multiple environments.])m4_page_footer
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -