Debian Codegraph @

docs/programmer_reference/txn_config.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>Configuring transactions</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="txn.html" title="Chapter 19.  The Transaction Subsystem" />
11 <link rel="prev" href="txn.html" title="Chapter 19.  The Transaction Subsystem" />
12 <link rel="next" href="txn_limits.html" title="Transaction limits" />
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">Configuring transactions</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="txn.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 19. 
26 The Transaction Subsystem
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="txn_limits.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="txn_config"></a>Configuring transactions</h2>
38 </div>
39 </div>
40 </div>
41 <p>The application may change the number of simultaneous outstanding
42 transactions supported by the Berkeley DB environment by calling the
43 <a href="../api_reference/C/envset_tx_max.html" class="olink">DB_ENV-&gt;set_tx_max()</a> method. This will also set the size of the
44 underlying transaction subsystem's region. When the number of
45 outstanding transactions is reached, additional calls to
46 <a href="../api_reference/C/txnbegin.html" class="olink">DB_ENV-&gt;txn_begin()</a> will fail until some active transactions complete.</p>
47 <p>The application can limit how long a transaction runs or blocks on
48 contested resources.
49 The <a href="../api_reference/C/envset_timeout.html" class="olink">DB_ENV-&gt;set_timeout()</a> method specifies the length of the timeout.
50 This value is checked whenever deadlock detection is performed or
51 when the transaction is about to block on a lock that cannot be
52 immediately granted.
53 Because timeouts are only checked at these times, the accuracy of the
54 timeout depends on how often deadlock detection is performed or how
55 frequently the transaction blocks.</p>
56 <p>There is an additional parameter used in configuring transactions; the
57 <a href="../api_reference/C/envset_flags.html#envset_flags_DB_TXN_NOSYNC" class="olink">DB_TXN_NOSYNC</a>. Setting the <a href="../api_reference/C/envset_flags.html#envset_flags_DB_TXN_NOSYNC" class="olink">DB_TXN_NOSYNC</a> flag to
58 <a href="../api_reference/C/envset_flags.html" class="olink">DB_ENV-&gt;set_flags()</a> when opening a transaction region changes the
59 behavior of transactions to not write or synchronously flush the log
60 during transaction commit.</p>
61 <p>This change may significantly increase application transactional
62 throughput. However, it means that although transactions will continue
63 to exhibit the ACI (atomicity, consistency, and isolation) properties,
64 they will not have D (durability). Database integrity will be
65 maintained, but it is possible that some number of the most recently
66 committed transactions may be undone during recovery instead of being
67 redone.</p>
68 </div>
69 <div class="navfooter">
70 <hr />
71 <table width="100%" summary="Navigation footer">
72 <tr>
73 <td width="40%" align="left"><a accesskey="p" href="txn.html">Prev</a> </td>
74 <td width="20%" align="center">
75 <a accesskey="u" href="txn.html">Up</a>
76 </td>
77 <td width="40%" align="right"> <a accesskey="n" href="txn_limits.html">Next</a></td>
78 </tr>
79 <tr>
80 <td width="40%" align="left" valign="top">Chapter 19. 
81 The Transaction Subsystem
82  </td>
83 <td width="20%" align="center">
84 <a accesskey="h" href="index.html">Home</a>
85 </td>
86 <td width="40%" align="right" valign="top"> Transaction limits</td>
87 </tr>
88 </table>
89 </div>
90 </body>
91 </html>