Debian Codegraph @

docs/programmer_reference/ch13s02.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>Berkeley DB XA Implementation</title>
7 <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" />
10 <link rel="up" href="xa.html" title="Chapter 13.  Distributed Transactions" />
11 <link rel="prev" href="xa.html" title="Chapter 13.  Distributed Transactions" />
12 <link rel="next" href="xa_build.html" title="Building a Global Transaction Manager" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">Berkeley DB XA Implementation</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="xa.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 13. 
26 Distributed Transactions
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="xa_build.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="idp52716312"></a>Berkeley DB XA Implementation</h2>
38 </div>
39 </div>
40 </div>
41 <p>
42 Berkeley DB provides support for distributed transactions using the two-phase commit protocol
43 via its <a href="../api_reference/C/txnprepare.html" class="olink">DB_TXN-&gt;prepare()</a> interfaces.
44 The <a href="../api_reference/C/txnprepare.html" class="olink">DB_TXN-&gt;prepare()</a> method performs the first phase of a
45 two-phase commit, flushing the log to disk, and associating a global
46 transaction ID with the underlying Berkeley DB transaction.
47 This global transaction ID is used by the global transaction manager to
48 identify the Berkeley DB transaction, and will be returned by the
49 <a href="../api_reference/C/txnrecover.html" class="olink">DB_ENV-&gt;txn_recover()</a> method when it is called during recovery.
50 </p>
51 <p>
52 However, Berkeley DB does not perform distributed deadlock detection.
53 Instead, when being used as an XA resource manager, Berkeley DB acquires all locks
54 in a non-blocking mode. This results in pre-emptive abort of transactions that have the potential to deadlock.
55 While this can lead to more transactions being aborted than is strictly necessary,
56 it avoids system-wide hanging due to distributed deadlocks.
57 </p>
58 <p>When using distributed transactions, there is no way to perform
59 hot backups of multiple environments and guarantee that the backups
60 are globally transaction-consistent across these multiple environments.
61 If backups are desired, then all write transactions should be suspended;
62 that is, active write transactions must be allowed to complete and no
63 new write transactions should be begun. Once there are no active write
64 transactions, the logs may be copied for backup purposes and the backup
65 will be consistent across the multiple environments.</p>
66 </div>
67 <div class="navfooter">
68 <hr />
69 <table width="100%" summary="Navigation footer">
70 <tr>
71 <td width="40%" align="left"><a accesskey="p" href="xa.html">Prev</a> </td>
72 <td width="20%" align="center">
73 <a accesskey="u" href="xa.html">Up</a>
74 </td>
75 <td width="40%" align="right"> <a accesskey="n" href="xa_build.html">Next</a></td>
76 </tr>
77 <tr>
78 <td width="40%" align="left" valign="top">Chapter 13. 
79 Distributed Transactions
80  </td>
81 <td width="20%" align="center">
82 <a accesskey="h" href="index.html">Home</a>
83 </td>
84 <td width="40%" align="right" valign="top"> Building a Global Transaction Manager</td>
85 </tr>
86 </table>
87 </div>
88 </body>
89 </html>