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>Managing Blocking Operations</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="Getting Started with Replicated Berkeley DB Applications" /> 10 <link rel="up" href="addfeatures.html" title="Chapter��5.��Additional Features" /> 11 <link rel="prev" href="addfeatures.html" title="Chapter��5.��Additional Features" /> 12 <link rel="next" href="noautoinit.html" title="Stop Auto-Initialization" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">Managing Blocking Operations</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="addfeatures.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��5.��Additional Features</th> 23 <td width="20%" align="right">��<a accesskey="n" href="noautoinit.html">Next</a></td> 24 </tr> 25 </table> 26 <hr /> 27 </div> 28 <div class="sect1" lang="en" xml:lang="en"> 29 <div class="titlepage"> 30 <div> 31 <div> 32 <h2 class="title" style="clear: both"><a id="manageblock"></a>Managing Blocking Operations</h2> 33 </div> 34 </div> 35 </div> 36 <p> 37 When a replica is in the process of synchronizing with 38 its master, DB operations are blocked at some 39 points during this process until the synchronization is 40 completed. For replicas with a heavy read load, these 41 blocked operations may represent an unacceptable loss 42 in throughput. 43 </p> 44 <p> 45 You can configure DB so that it will not block when synchronization is in 46 process. Instead, the DB operation will fail, 47 48 <span> 49 immediately returning a <code class="literal">DB_REP_LOCKOUT</code> error. 50 </span> 51 52 53 When this happens, it is up to your application to determine 54 what action to take (that is, logging the event, making an appropriate user 55 response, retrying the operation, and so forth). 56 </p> 57 <p> 58 To turn off blocking on synchronization, specify 59 <span> 60 <code class="literal">DB_REP_CONF_NOWAIT</code> to 61 62 <code class="methodname">DbEnv::rep_set_config()</code> 63 and then specify <code class="literal">1</code> to the <code class="literal">onoff</code> 64 parameter. (Specify <code class="literal">0</code> to turn the feature off.) 65 </span> 66 67 </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="addfeatures.html">Prev</a>��</td> 74 <td width="20%" align="center"> 75 <a accesskey="u" href="addfeatures.html">Up</a> 76 </td> 77 <td width="40%" align="right">��<a accesskey="n" href="noautoinit.html">Next</a></td> 78 </tr> 79 <tr> 80 <td width="40%" align="left" valign="top">Chapter��5.��Additional Features��</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">��Stop Auto-Initialization</td> 85 </tr> 86 </table> 87 </div> 88 </body> 89</html> 90