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>Replication environment priorities</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="Berkeley DB Programmer's Reference Guide" /> 10 <link rel="up" href="rep.html" title="Chapter��12.�� Berkeley DB Replication" /> 11 <link rel="prev" href="rep_id.html" title="Replication environment IDs" /> 12 <link rel="next" href="rep_app.html" title="Building replicated applications" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">Replication environment priorities</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="rep_id.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��12.�� 23 Berkeley DB Replication 24 </th> 25 <td width="20%" align="right">��<a accesskey="n" href="rep_app.html">Next</a></td> 26 </tr> 27 </table> 28 <hr /> 29 </div> 30 <div class="sect1" lang="en" xml:lang="en"> 31 <div class="titlepage"> 32 <div> 33 <div> 34 <h2 class="title" style="clear: both"><a id="rep_pri"></a>Replication environment priorities</h2> 35 </div> 36 </div> 37 </div> 38 <p>Each database environment included in a replication group must have 39a priority, which specifies a relative ordering among the different 40environments in a replication group. This ordering is a factor in 41determining which environment will be selected as a new master in case 42the existing master fails. Both Replication Manager applications and 43Base API applications should specify 44environment priorities.</p> 45 <p>Priorities are an unsigned integer, but do not need to be unique 46throughout the replication group. A priority of 0 means the system can 47never become a master. Otherwise, larger valued priorities 48indicate a more desirable master. For example, if a replication group 49consists of three database environments, two of which are connected by 50an OC3 and the third of which is connected by a T1, the third database 51environment should be assigned a priority value which is lower than 52either of the other two.</p> 53 <p>Desirability of the master is first determined by the client having 54the most recent log records. Ties in log records are broken with 55the client priority. If both sites have the same number of log 56records and the same priority, one is selected at random.</p> 57 </div> 58 <div class="navfooter"> 59 <hr /> 60 <table width="100%" summary="Navigation footer"> 61 <tr> 62 <td width="40%" align="left"><a accesskey="p" href="rep_id.html">Prev</a>��</td> 63 <td width="20%" align="center"> 64 <a accesskey="u" href="rep.html">Up</a> 65 </td> 66 <td width="40%" align="right">��<a accesskey="n" href="rep_app.html">Next</a></td> 67 </tr> 68 <tr> 69 <td width="40%" align="left" valign="top">Replication environment IDs��</td> 70 <td width="20%" align="center"> 71 <a accesskey="h" href="index.html">Home</a> 72 </td> 73 <td width="40%" align="right" valign="top">��Building replicated applications</td> 74 </tr> 75 </table> 76 </div> 77 </body> 78</html> 79