Debian Codegraph @

docs/upgrading/upgrade_4_2_lockng.html

raw
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>DB_LOCK_NOTGRANTED</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 Upgrade Guide" />
10 <link rel="up" href="upgrade_4_2_toc.html" title="Chapter 8. Upgrading Berkeley DB 4.1 applications to Berkeley DB 4.2" />
11 <link rel="prev" href="upgrade_4_2_verify.html" title="DB-&gt;verify" />
12 <link rel="next" href="upgrade_4_2_repinit.html" title="Replication" />
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">DB_LOCK_NOTGRANTED</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="upgrade_4_2_verify.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 8. Upgrading Berkeley DB 4.1 applications to Berkeley DB 4.2</th>
26 <td width="20%" align="right"> <a accesskey="n" href="upgrade_4_2_repinit.html">Next</a></td>
27 </tr>
28 </table>
29 <hr />
30 </div>
31 <div class="sect1" lang="en" xml:lang="en">
32 <div class="titlepage">
33 <div>
34 <div>
35 <h2 class="title" style="clear: both"><a id="upgrade_4_2_lockng"></a>DB_LOCK_NOTGRANTED</h2>
36 </div>
37 </div>
38 </div>
39 <p>
40 In previous releases, configuring lock or transaction timeout values or calling the <a href="../api_reference/C/txnbegin.html" class="olink">DB_ENV-&gt;txn_begin()</a>
41 method with the <a href="../api_reference/C/txnbegin.html#txnbegin_DB_TXN_NOWAIT" class="olink">DB_TXN_NOWAIT</a> flag caused database operation methods to return
42 <a href="../programmer_reference/program_errorret.html#program_errorret.DB_LOCK_NOTGRANTED" class="olink">DB_LOCK_NOTGRANTED</a>, or throw a <a href="../api_reference/CXX/dblocknotgranted.html" class="olink">DbLockNotGrantedException</a>
43 exception. This required applications to unnecessarily handle multiple errors or
44 exception types.
45 </p>
46 <p>
47 In the Berkeley DB 4.2 release, with one exception, database operations will no longer return
48 <a href="../programmer_reference/program_errorret.html#program_errorret.DB_LOCK_NOTGRANTED" class="olink">DB_LOCK_NOTGRANTED</a> or throw a <a href="../api_reference/CXX/dblocknotgranted.html" class="olink">DbLockNotGrantedException</a>
49 exception. Instead, database operations will return
50 <a href="../programmer_reference/program_errorret.html#program_errorret.DB_LOCK_DEADLOCK" class="olink">DB_LOCK_DEADLOCK</a> or throw a <a href="../api_reference/CXX/dbdeadlock.html" class="olink">DbDeadlockException</a>
51 exception. This change should require no application changes, as applications must
52 already be dealing with the possible <a href="../programmer_reference/program_errorret.html#program_errorret.DB_LOCK_DEADLOCK" class="olink">DB_LOCK_DEADLOCK</a> error return or <a href="../api_reference/CXX/dbdeadlock.html" class="olink">DbDeadlockException</a>
53 exception from database operations.
54 </p>
55 <p>
56 The one exception to this rule is the <a href="../api_reference/C/dbget.html" class="olink">DB-&gt;get()</a> method using the <a href="../api_reference/C/dbget.html#dbget_DB_CONSUME_WAIT" class="olink">DB_CONSUME_WAIT</a> flag to consume records
57 from a Queue. If lock or transaction timeouts are set, this method and flag combination may
58 return <a href="../programmer_reference/program_errorret.html#program_errorret.DB_LOCK_NOTGRANTED" class="olink">DB_LOCK_NOTGRANTED</a> or throw a <a href="../api_reference/CXX/dblocknotgranted.html" class="olink">DbLockNotGrantedException</a>
59 exception.
60 </p>
61 <p>
62 Applications wanting to distinguish between true deadlocks and timeouts can configure database
63 operation methods to return <a href="../programmer_reference/program_errorret.html#program_errorret.DB_LOCK_NOTGRANTED" class="olink">DB_LOCK_NOTGRANTED</a> or throw a <a href="../api_reference/CXX/dblocknotgranted.html" class="olink">DbLockNotGrantedException</a>
64 exception using the <a href="../api_reference/C/envset_flags.html#envset_flags_DB_TIME_NOTGRANTED" class="olink">DB_TIME_NOTGRANTED</a> flag.
65 </p>
66 <p>
67 The <a href="../api_reference/C/lockget.html" class="olink">DB_ENV-&gt;lock_get()</a> and <a href="../api_reference/C/lockvec.html" class="olink">DB_ENV-&gt;lock_vec()</a> methods will continue to return
68 <a href="../programmer_reference/program_errorret.html#program_errorret.DB_LOCK_NOTGRANTED" class="olink">DB_LOCK_NOTGRANTED</a>, or throw a <a href="../api_reference/CXX/dblocknotgranted.html" class="olink">DbLockNotGrantedException</a>
69 exception as they have previously done.
70 </p>
71 </div>
72 <div class="navfooter">
73 <hr />
74 <table width="100%" summary="Navigation footer">
75 <tr>
76 <td width="40%" align="left"><a accesskey="p" href="upgrade_4_2_verify.html">Prev</a> </td>
77 <td width="20%" align="center">
78 <a accesskey="u" href="upgrade_4_2_toc.html">Up</a>
79 </td>
80 <td width="40%" align="right"> <a accesskey="n" href="upgrade_4_2_repinit.html">Next</a></td>
81 </tr>
82 <tr>
83 <td width="40%" align="left" valign="top">DB-&gt;verify </td>
84 <td width="20%" align="center">
85 <a accesskey="h" href="index.html">Home</a>
86 </td>
87 <td width="40%" align="right" valign="top"> Replication</td>
88 </tr>
89 </table>
90 </div>
91 </body>
92 </html>