Debian Codegraph @

docs/api_reference/C/repset_request.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>DB_ENV-&gt;rep_set_request()</title>
7 <link rel="stylesheet" href="apiReference.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 C API Reference" />
10 <link rel="up" href="rep.html" title="Chapter 10.  Replication Methods" />
11 <link rel="prev" href="reppriority.html" title="DB_ENV-&gt;rep_set_priority()" />
12 <link rel="next" href="repset_timeout.html" title="DB_ENV-&gt;rep_set_timeout()" />
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_ENV-&gt;rep_set_request()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="reppriority.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 10. 
26 Replication Methods
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="repset_timeout.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="repset_request"></a>DB_ENV-&gt;rep_set_request()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DB_ENV-&gt;rep_set_request(DB_ENV *env, u_int32_t min, u_int32_t max); </pre>
45 <p>
46 The <code class="methodname">DB_ENV-&gt;rep_set_request()</code> method sets a
47 threshold for the minimum and maximum time that a client waits
48 before requesting retransmission of a missing message.
49 Specifically, if the client detects a gap in the sequence of
50 incoming log records or database pages, Berkeley DB will wait for
51 at least <span class="bold"><strong>min</strong></span> microseconds before
52 requesting retransmission of the missing record. Berkeley DB will
53 double that amount before requesting the same missing record
54 again, and so on, up to a maximum threshold of
55 <span class="bold"><strong>max</strong></span> microseconds.
56 </p>
57 <p>
58 These values are thresholds only. Replication Manager applications
59 use these values to determine when to automatically request
60 retransmission of missing messages. For Base API applications,
61 Berkeley DB has no thread available in the library as a timer, so
62 the threshold is only checked when a thread enters the Berkeley DB
63 library to process an incoming replication message. Any amount of
64 time may have passed since the last message arrived and Berkeley
65 DB only checks whether the amount of time since a request was made
66 is beyond the threshold value or not.
67 </p>
68 <p>
69 By default the minimum is 40000 and the maximum is 1280000 (1.28
70 seconds). These defaults are fairly arbitrary and the application
71 likely needs to adjust these. The values should be based on
72 expected load and performance characteristics of the master and
73 client host platforms and transport infrastructure as well as
74 round-trip message time.
75 </p>
76 <p>
77 The database environment's replication subsystem may also be
78 configured using the environment's <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file. The syntax
79 of the entry in that file is a single line with the string
80 "rep_set_request", one or more whitespace characters, and the
81 request times specified in two parts: the min and the max. For
82 example, "rep_set_request 40000 1280000". Because the <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a>
83 file is read when the database environment is opened, it will
84 silently overrule configuration done before that time.
85 </p>
86 <p>
87 The <code class="methodname">DB_ENV-&gt;rep_set_request()</code> method
88 configures a database environment, not only operations performed
89 using the specified <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>
90 handle.
91 </p>
92 <p>
93 The <code class="methodname">DB_ENV-&gt;rep_set_request()</code> method may be
94 called at any time during the life of the application.
95 </p>
96 <p>
97 The <code class="methodname">DB_ENV-&gt;rep_set_request()</code> <span>
98 <span>
99 method returns a non-zero error value on failure and 0 on success.
100 </span>
101
102 </span>
103 </p>
104 <div class="sect2" lang="en" xml:lang="en">
105 <div class="titlepage">
106 <div>
107 <div>
108 <h3 class="title"><a id="idp54175512"></a>Parameters</h3>
109 </div>
110 </div>
111 </div>
112 <div class="sect3" lang="en" xml:lang="en">
113 <div class="titlepage">
114 <div>
115 <div>
116 <h4 class="title"><a id="idp54175312"></a>min</h4>
117 </div>
118 </div>
119 </div>
120 <p>
121 The minimum number of microseconds a client waits before requesting
122 retransmission.
123 </p>
124 </div>
125 <div class="sect3" lang="en" xml:lang="en">
126 <div class="titlepage">
127 <div>
128 <div>
129 <h4 class="title"><a id="idp54186232"></a>max</h4>
130 </div>
131 </div>
132 </div>
133 <p>
134 The maximum number of microseconds a client waits before requesting
135 retransmission.
136 </p>
137 </div>
138 </div>
139 <div class="sect2" lang="en" xml:lang="en">
140 <div class="titlepage">
141 <div>
142 <div>
143 <h3 class="title"><a id="idp54176592"></a>Errors</h3>
144 </div>
145 </div>
146 </div>
147 <p>
148 The <code class="methodname">DB_ENV-&gt;rep_set_request()</code> <span>
149 <span>
150 method may fail and return one of the following non-zero errors:
151 </span>
152
153 </span>
154 </p>
155 <div class="sect3" lang="en" xml:lang="en">
156 <div class="titlepage">
157 <div>
158 <div>
159 <h4 class="title"><a id="idp54166912"></a>EINVAL</h4>
160 </div>
161 </div>
162 </div>
163 <p>
164 An invalid flag value or parameter was specified.
165 </p>
166 </div>
167 </div>
168 <div class="sect2" lang="en" xml:lang="en">
169 <div class="titlepage">
170 <div>
171 <div>
172 <h3 class="title"><a id="idp54164624"></a>Class</h3>
173 </div>
174 </div>
175 </div>
176 <p>
177 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>
178 </p>
179 </div>
180 <div class="sect2" lang="en" xml:lang="en">
181 <div class="titlepage">
182 <div>
183 <div>
184 <h3 class="title"><a id="idp54146632"></a>See Also</h3>
185 </div>
186 </div>
187 </div>
188 <p>
189 <a class="xref" href="rep.html#replist" title="Replication and Related Methods">Replication and Related Methods</a>
190 </p>
191 </div>
192 </div>
193 <div class="navfooter">
194 <hr />
195 <table width="100%" summary="Navigation footer">
196 <tr>
197 <td width="40%" align="left"><a accesskey="p" href="reppriority.html">Prev</a> </td>
198 <td width="20%" align="center">
199 <a accesskey="u" href="rep.html">Up</a>
200 </td>
201 <td width="40%" align="right"> <a accesskey="n" href="repset_timeout.html">Next</a></td>
202 </tr>
203 <tr>
204 <td width="40%" align="left" valign="top">DB_ENV-&gt;rep_set_priority() </td>
205 <td width="20%" align="center">
206 <a accesskey="h" href="index.html">Home</a>
207 </td>
208 <td width="40%" align="right" valign="top"> DB_ENV-&gt;rep_set_timeout()</td>
209 </tr>
210 </table>
211 </div>
212 </body>
213 </html>