<!--$Id: repinit.so,v 1.11 2004/09/28 14:13:09 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Release 4.2: Replication</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Upgrading Berkeley DB Applications</dl></b></td>
<td align=right><a href="../upgrade.4.2/lockng.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../upgrade.4.2/nosync.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p align=center><b>Release 4.2: Replication</b></p>
<b>Replication initialization</b>
<p>In the Berkeley DB 4.2 release, replication environments must be specifically
initialized by any process that will ever do anything other than open
databases in read-only mode (that is, any process which might call any
of the Berkeley DB replication interfaces or modify databases). This
initialization is done when the replication database environment handle
is opened, by specifying the <a href="../../api_c/env_open.html#DB_INIT_REP">DB_INIT_REP</a> flag to the
<a href="../../api_c/env_open.html">DB_ENV->open</a> method.</p>
<b>Database methods and replication clients</b>
<p>All of the <a href="../../api_c/db_class.html">DB</a> object methods may now return
<a href="../../api_c/db_put.html#DB_REP_HANDLE_DEAD">DB_REP_HANDLE_DEAD</a> when a replication client changes masters.
When this happens the <a href="../../api_c/db_class.html">DB</a> handle is no longer able to be used and
the application must close the handle using the <a href="../../api_c/db_close.html">DB->close</a> method and
open a new handle. This new return value is returned when a client
unrolls a transaction in order to synchronize with the new master.
Otherwise, if the application was permitted to use the original handle,
it's possible the handle might attempt to access nonexistent resources.</p>
<b><a href="../../api_c/rep_message.html">DB_ENV->rep_process_message</a></b>
<p>The <a href="../../api_c/rep_message.html">DB_ENV->rep_process_message</a> method has new return values and an log sequence
number (LSN) associated with those return values. The new argument is
<b>ret_lsnp</b>, which is the returned LSN when the
<a href="../../api_c/rep_message.html">DB_ENV->rep_process_message</a> method returns <a href="../../api_c/rep_message.html#DB_REP_ISPERM">DB_REP_ISPERM</a> or
<a href="../../api_c/rep_message.html#DB_REP_NOTPERM">DB_REP_NOTPERM</a>. See <a href="../../ref/rep/trans.html">Transactional guarantees</a> for more information.</p>
<table width="100%"><tr><td><br></td><td align=right><a href="../upgrade.4.2/lockng.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../upgrade.4.2/nosync.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
</body>
</html>
Copyright 2K16 - 2K18 Indonesian Hacker Rulez