• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/docs/gsg_db_rep/C/
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>Chapter��5.��Additional Features</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="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
11    <link rel="prev" href="exampledoloop.html" title="Example Processing Loop" />
12    <link rel="next" href="manageblock.html" title="Managing Blocking Operations" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">Chapter��5.��Additional Features</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="exampledoloop.html">Prev</a>��</td>
22          <th width="60%" align="center">��</th>
23          <td width="20%" align="right">��<a accesskey="n" href="manageblock.html">Next</a></td>
24        </tr>
25      </table>
26      <hr />
27    </div>
28    <div class="chapter" lang="en" xml:lang="en">
29      <div class="titlepage">
30        <div>
31          <div>
32            <h2 class="title"><a id="addfeatures"></a>Chapter��5.��Additional Features</h2>
33          </div>
34        </div>
35      </div>
36      <div class="toc">
37        <p>
38          <b>Table of Contents</b>
39        </p>
40        <dl>
41          <dt>
42            <span class="sect1">
43              <a href="addfeatures.html#delayedsync">Delayed Synchronization</a>
44            </span>
45          </dt>
46          <dt>
47            <span class="sect1">
48              <a href="manageblock.html">Managing Blocking Operations</a>
49            </span>
50          </dt>
51          <dt>
52            <span class="sect1">
53              <a href="noautoinit.html">Stop Auto-Initialization</a>
54            </span>
55          </dt>
56          <dt>
57            <span class="sect1">
58              <a href="c2ctransfer.html">Client to Client Transfer</a>
59            </span>
60          </dt>
61          <dd>
62            <dl>
63              <dt>
64                <span class="sect2">
65                  <a href="c2ctransfer.html#fmwrkpeerserver">Identifying Peers</a>
66                </span>
67              </dt>
68            </dl>
69          </dd>
70          <dt>
71            <span class="sect1">
72              <a href="bulk.html">Bulk Transfers</a>
73            </span>
74          </dt>
75        </dl>
76      </div>
77      <p>
78            Beyond the basic functionality that we have discussed so far in
79            this book, there are several replication features that you
80            should understand. These are all optional to use, but provide
81            useful functionality under the right circumstances.
82    </p>
83      <p>
84            These additional features are:
85    </p>
86      <div class="orderedlist">
87        <ol type="1">
88          <li>
89            <p>
90                            <a class="xref" href="addfeatures.html#delayedsync" title="Delayed Synchronization">Delayed Synchronization</a>
91                    </p>
92          </li>
93          <li>
94            <p>
95                            <a class="xref" href="manageblock.html" title="Managing Blocking Operations">Managing Blocking Operations</a>
96                    </p>
97          </li>
98          <li>
99            <p>
100                            <a class="xref" href="noautoinit.html" title="Stop Auto-Initialization">Stop Auto-Initialization</a>
101                    </p>
102          </li>
103          <li>
104            <p>
105                            <a class="xref" href="c2ctransfer.html" title="Client to Client Transfer">Client to Client Transfer</a>
106                    </p>
107          </li>
108          <li>
109            <p>
110                            <a class="xref" href="bulk.html" title="Bulk Transfers">Bulk Transfers</a>
111                    </p>
112          </li>
113        </ol>
114      </div>
115      <div class="sect1" lang="en" xml:lang="en">
116        <div class="titlepage">
117          <div>
118            <div>
119              <h2 class="title" style="clear: both"><a id="delayedsync"></a>Delayed Synchronization</h2>
120            </div>
121          </div>
122        </div>
123        <p>
124                When a replication group has a new master, all replicas must
125                synchronize with that master. This means they must ensure
126                that the contents of their local database(s) are identical
127                to that contained by the new master.
128        </p>
129        <p>
130                This synchronization process can result in quite a lot of
131                network activity. It can also put a large strain on the
132                master server, especially if is part of a large
133                replication group or if there is somehow a large difference between
134                the master's database(s) and the contents of its replicas. 
135        </p>
136        <p>
137                It is therefore possible to delay synchronization for any
138                replica that discovers it has a new master. You would do
139                this so as to give the master time to synchronize other
140                replicas before proceeding with the delayed replicas.
141        </p>
142        <p>
143                To delay synchronization of a replica environment, you
144                specify 
145                    <span>
146                        <code class="literal">DB_REP_CONF_DELAYCLIENT</code> to
147                            <code class="methodname">DB_ENV-&gt;rep_set_config()</code>
148                            
149                        and then specify <code class="literal">1</code> to the <code class="literal">onoff</code>
150                        parameter. (Specify <code class="literal">0</code> to turn the feature off.)
151                    </span>
152                    
153        </p>
154        <p>
155                If you use delayed synchronization, then you must manually
156                synchronize the replica at some future time. Until you do this, the replica is out of
157                sync with the master, and it will ignore all database changes forwarded to it from 
158                the master. 
159        </p>
160        <p>
161                You synchronize a delayed replica by calling
162                    <code class="methodname">DB_ENV-&gt;rep_sync()</code>
163                    
164                    
165                on the replica that has been delayed.
166        </p>
167      </div>
168    </div>
169    <div class="navfooter">
170      <hr />
171      <table width="100%" summary="Navigation footer">
172        <tr>
173          <td width="40%" align="left"><a accesskey="p" href="exampledoloop.html">Prev</a>��</td>
174          <td width="20%" align="center">��</td>
175          <td width="40%" align="right">��<a accesskey="n" href="manageblock.html">Next</a></td>
176        </tr>
177        <tr>
178          <td width="40%" align="left" valign="top">Example Processing Loop��</td>
179          <td width="20%" align="center">
180            <a accesskey="h" href="index.html">Home</a>
181          </td>
182          <td width="40%" align="right" valign="top">��Managing Blocking Operations</td>
183        </tr>
184      </table>
185    </div>
186  </body>
187</html>
188