mirror of
https://github.com/berkeleydb/libdb.git
synced 2024-11-16 17:16:25 +00:00
92 lines
4.1 KiB
HTML
92 lines
4.1 KiB
HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||
<title>Managing Blocking Operations</title>
|
||
<link rel="stylesheet" href="gettingStarted.css" type="text/css" />
|
||
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
|
||
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
|
||
<link rel="up" href="addfeatures.html" title="Chapter 5. Additional Features" />
|
||
<link rel="prev" href="addfeatures.html" title="Chapter 5. Additional Features" />
|
||
<link rel="next" href="autoinit.html" title="Stop Auto-Initialization" />
|
||
</head>
|
||
<body>
|
||
<div xmlns="" class="navheader">
|
||
<div class="libver">
|
||
<p>Library Version 11.2.5.3</p>
|
||
</div>
|
||
<table width="100%" summary="Navigation header">
|
||
<tr>
|
||
<th colspan="3" align="center">Managing Blocking Operations</th>
|
||
</tr>
|
||
<tr>
|
||
<td width="20%" align="left"><a accesskey="p" href="addfeatures.html">Prev</a> </td>
|
||
<th width="60%" align="center">Chapter 5. Additional Features</th>
|
||
<td width="20%" align="right"> <a accesskey="n" href="autoinit.html">Next</a></td>
|
||
</tr>
|
||
</table>
|
||
<hr />
|
||
</div>
|
||
<div class="sect1" lang="en" xml:lang="en">
|
||
<div class="titlepage">
|
||
<div>
|
||
<div>
|
||
<h2 class="title" style="clear: both"><a id="manageblock"></a>Managing Blocking Operations</h2>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<p>
|
||
When a replica is in the process of synchronizing with
|
||
its master, DB operations are blocked at some
|
||
points during this process until the synchronization is
|
||
completed. For replicas with a heavy read load, these
|
||
blocked operations may represent an unacceptable loss
|
||
in throughput.
|
||
</p>
|
||
<p>
|
||
You can configure DB so that it will not block when synchronization is in
|
||
process. Instead, the DB operation will fail,
|
||
|
||
<span>
|
||
immediately returning a <code class="literal">DB_REP_LOCKOUT</code> error.
|
||
</span>
|
||
|
||
|
||
When this happens, it is up to your application to determine
|
||
what action to take (that is, logging the event, making an appropriate user
|
||
response, retrying the operation, and so forth).
|
||
</p>
|
||
<p>
|
||
To turn off blocking on synchronization, specify
|
||
<span>
|
||
<code class="literal">DB_REP_CONF_NOWAIT</code> to
|
||
|
||
<code class="methodname">DbEnv::rep_set_config()</code>
|
||
and then specify <code class="literal">1</code> to the <code class="literal">onoff</code>
|
||
parameter. (Specify <code class="literal">0</code> to turn the feature off.)
|
||
</span>
|
||
|
||
</p>
|
||
</div>
|
||
<div class="navfooter">
|
||
<hr />
|
||
<table width="100%" summary="Navigation footer">
|
||
<tr>
|
||
<td width="40%" align="left"><a accesskey="p" href="addfeatures.html">Prev</a> </td>
|
||
<td width="20%" align="center">
|
||
<a accesskey="u" href="addfeatures.html">Up</a>
|
||
</td>
|
||
<td width="40%" align="right"> <a accesskey="n" href="autoinit.html">Next</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="40%" align="left" valign="top">Chapter 5. Additional Features </td>
|
||
<td width="20%" align="center">
|
||
<a accesskey="h" href="index.html">Home</a>
|
||
</td>
|
||
<td width="40%" align="right" valign="top"> Stop Auto-Initialization</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</body>
|
||
</html>
|