Imported Upstream version 5.3.21
[platform/upstream/libdb.git] / docs / gsg_db_rep / C / autoinit.html
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>Stop Auto-Initialization</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="manageblock.html" title="Managing Blocking Operations" />
12     <link rel="next" href="rywc.html" title="Read-Your-Writes Consistency" />
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">Stop Auto-Initialization</th>
22         </tr>
23         <tr>
24           <td width="20%" align="left"><a accesskey="p" href="manageblock.html">Prev</a> </td>
25           <th width="60%" align="center">Chapter 5. Additional Features</th>
26           <td width="20%" align="right"> <a accesskey="n" href="rywc.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="autoinit"></a>Stop Auto-Initialization</h2>
36           </div>
37         </div>
38       </div>
39       <p>
40                     As stated in the previous section, when a replication
41                     replica is synchronizing with its master, it will block
42                     DB operations at some points during this process
43                     until the synchronization is completed. You can turn
44                     off this behavior (see <a class="xref" href="manageblock.html" title="Managing Blocking Operations">Managing Blocking Operations</a>), but for replicas
45                     that have been out of touch from their master for a
46                     very long time, this may not be enough.
47
48             </p>
49       <p>
50                     If a replica has been out of touch from its master long enough, it may find that
51                     it is not possible to perform synchronization. When this happens, by default the
52                     master and replica internally decide to completely re-initialize the replica.
53                     This re-initialization involves discarding the replica's current database(s) and
54                     transferring new ones to it from the master. Depending on the size of the master's
55                     databases, this can take a long time, during which time the replica will be
56                     completely non-responsive when it comes to performing database operations.
57             </p>
58       <p>
59                 It is possible that there is a time of the day when it is better to perform a replica
60                 re-initialization. Or, you simply might want to decide to bring the replica up to
61                 speed by restoring its databases using a hot-backup taken from the master. Either
62                 way, you can decide to prevent automatic-initialization of your replica. To do this
63                 specify
64                     <span>
65                         <code class="literal">DB_REP_CONF_AUTOINIT</code> to
66                             <code class="methodname">DB_ENV-&gt;rep_set_config()</code>
67                             
68                         and then specify <code class="literal">0</code> to the <code class="literal">onoff</code>
69                         parameter.
70                     </span>
71                     
72             </p>
73     </div>
74     <div class="navfooter">
75       <hr />
76       <table width="100%" summary="Navigation footer">
77         <tr>
78           <td width="40%" align="left"><a accesskey="p" href="manageblock.html">Prev</a> </td>
79           <td width="20%" align="center">
80             <a accesskey="u" href="addfeatures.html">Up</a>
81           </td>
82           <td width="40%" align="right"> <a accesskey="n" href="rywc.html">Next</a></td>
83         </tr>
84         <tr>
85           <td width="40%" align="left" valign="top">Managing Blocking Operations </td>
86           <td width="20%" align="center">
87             <a accesskey="h" href="index.html">Home</a>
88           </td>
89           <td width="40%" align="right" valign="top"> Read-Your-Writes Consistency</td>
90         </tr>
91       </table>
92     </div>
93   </body>
94 </html>