1<!--$Id: pri.so,v 1.8 2007/12/03 21:01:22 sue Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB Reference Guide: Replication environment priorities</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<table width="100%"><tr valign=top>
12<td><b><dl><dt>Berkeley DB Reference Guide:<dd>Berkeley DB Replication</dl></b></td>
13<td align=right><a href="/rep/id.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/rep/app.html"><img src="/images/next.gif" alt="Next"></a>
14</td></tr></table>
15<p align=center><b>Replication environment priorities</b></p>
16<p>Each database environment included in a replication group must have
17a priority, which specifies a relative ordering among the different
18environments in a replication group.  This ordering is a factor in
19determining which environment will be selected as a new master in case
20the existing master fails.  Both Replication Manager applications and
21applications which use the Base replication API should specify
22environment priorities.</p>
23<p>Priorities are an unsigned integer, but do not need to be unique
24throughout the replication group.  A priority of 0 means the system can
25never become a master, regardless.  Otherwise, larger valued priorities
26indicate a more desirable master.  For example, if a replication group
27consists of three database environments, two of which are connected by
28an OC3 and the third of which is connected by a T1, the third database
29environment should be assigned a priority value which is lower than
30either of the other two.</p>
31<p>Desirability of the master is first determined by the client having
32the most recent log records.  Ties in log records are broken with
33the client priority.  If both sites have the same number of log
34records and the same priority, one is selected at random.</p>
35<table width="100%"><tr><td><br></td><td align=right><a href="/rep/id.html"><img src="/images/prev.gif" alt="Prev"></a><a href="/toc.html"><img src="/images/ref.gif" alt="Ref"></a><a href="/rep/app.html"><img src="/images/next.gif" alt="Next"></a>
36</td></tr></table>
37<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
38</body>
39</html>
40