summaryrefslogtreecommitdiff
path: root/docs/gsg_db_rep
diff options
context:
space:
mode:
Diffstat (limited to 'docs/gsg_db_rep')
-rw-r--r--docs/gsg_db_rep/C/Replication-C-GSG.pdfbin348175 -> 346006 bytes
-rw-r--r--docs/gsg_db_rep/C/addfeatures.html2
-rw-r--r--docs/gsg_db_rep/C/apioverview.html11
-rw-r--r--docs/gsg_db_rep/C/autoinit.html2
-rw-r--r--docs/gsg_db_rep/C/bulk.html2
-rw-r--r--docs/gsg_db_rep/C/c2ctransfer.html2
-rw-r--r--docs/gsg_db_rep/C/elections.html9
-rw-r--r--docs/gsg_db_rep/C/electiontimes.html6
-rw-r--r--docs/gsg_db_rep/C/eventhandling.html185
-rw-r--r--docs/gsg_db_rep/C/exampledoloop.html13
-rw-r--r--docs/gsg_db_rep/C/fmwrkconnectretry.html2
-rw-r--r--docs/gsg_db_rep/C/fwrkmasterreplica.html292
-rw-r--r--docs/gsg_db_rep/C/fwrkpermmessage.html80
-rw-r--r--docs/gsg_db_rep/C/heartbeats.html9
-rw-r--r--docs/gsg_db_rep/C/index.html17
-rw-r--r--docs/gsg_db_rep/C/introduction.html9
-rw-r--r--docs/gsg_db_rep/C/manageblock.html2
-rw-r--r--docs/gsg_db_rep/C/moreinfo.html16
-rw-r--r--docs/gsg_db_rep/C/permmessages.html113
-rw-r--r--docs/gsg_db_rep/C/preface.html4
-rw-r--r--docs/gsg_db_rep/C/processingloop.html2
-rw-r--r--docs/gsg_db_rep/C/rep_init_code.html4
-rw-r--r--docs/gsg_db_rep/C/repadvantage.html4
-rw-r--r--docs/gsg_db_rep/C/repapp.html17
-rw-r--r--docs/gsg_db_rep/C/repmgr_init_example_c.html19
-rw-r--r--docs/gsg_db_rep/C/rywc.html2
-rw-r--r--docs/gsg_db_rep/C/simpleprogramlisting.html4
-rw-r--r--docs/gsg_db_rep/C/txnapp.html12
-rw-r--r--docs/gsg_db_rep/CXX/Replication-CXX-GSG.pdfbin354251 -> 350239 bytes
-rw-r--r--docs/gsg_db_rep/CXX/addfeatures.html2
-rw-r--r--docs/gsg_db_rep/CXX/apioverview.html11
-rw-r--r--docs/gsg_db_rep/CXX/autoinit.html2
-rw-r--r--docs/gsg_db_rep/CXX/bulk.html2
-rw-r--r--docs/gsg_db_rep/CXX/c2ctransfer.html2
-rw-r--r--docs/gsg_db_rep/CXX/elections.html9
-rw-r--r--docs/gsg_db_rep/CXX/electiontimes.html6
-rw-r--r--docs/gsg_db_rep/CXX/eventhandling.html185
-rw-r--r--docs/gsg_db_rep/CXX/exampledoloop.html4
-rw-r--r--docs/gsg_db_rep/CXX/fmwrkconnectretry.html2
-rw-r--r--docs/gsg_db_rep/CXX/fwrkmasterreplica.html292
-rw-r--r--docs/gsg_db_rep/CXX/fwrkpermmessage.html80
-rw-r--r--docs/gsg_db_rep/CXX/heartbeats.html9
-rw-r--r--docs/gsg_db_rep/CXX/index.html17
-rw-r--r--docs/gsg_db_rep/CXX/introduction.html9
-rw-r--r--docs/gsg_db_rep/CXX/manageblock.html2
-rw-r--r--docs/gsg_db_rep/CXX/moreinfo.html16
-rw-r--r--docs/gsg_db_rep/CXX/permmessages.html113
-rw-r--r--docs/gsg_db_rep/CXX/preface.html4
-rw-r--r--docs/gsg_db_rep/CXX/processingloop.html2
-rw-r--r--docs/gsg_db_rep/CXX/rep_init_code.html4
-rw-r--r--docs/gsg_db_rep/CXX/repadvantage.html4
-rw-r--r--docs/gsg_db_rep/CXX/repapp.html17
-rw-r--r--docs/gsg_db_rep/CXX/repmgr_init_example_c.html10
-rw-r--r--docs/gsg_db_rep/CXX/rywc.html2
-rw-r--r--docs/gsg_db_rep/CXX/simpleprogramlisting.html2
-rw-r--r--docs/gsg_db_rep/CXX/txnapp.html10
-rw-r--r--docs/gsg_db_rep/JAVA/Replication-JAVA-GSG.pdfbin350107 -> 348367 bytes
-rw-r--r--docs/gsg_db_rep/JAVA/addfeatures.html2
-rw-r--r--docs/gsg_db_rep/JAVA/apioverview.html11
-rw-r--r--docs/gsg_db_rep/JAVA/autoinit.html2
-rw-r--r--docs/gsg_db_rep/JAVA/bulk.html2
-rw-r--r--docs/gsg_db_rep/JAVA/c2ctransfer.html2
-rw-r--r--docs/gsg_db_rep/JAVA/elections.html9
-rw-r--r--docs/gsg_db_rep/JAVA/electiontimes.html6
-rw-r--r--docs/gsg_db_rep/JAVA/eventhandling.html186
-rw-r--r--docs/gsg_db_rep/JAVA/exampledoloop.html2
-rw-r--r--docs/gsg_db_rep/JAVA/fmwrkconnectretry.html2
-rw-r--r--docs/gsg_db_rep/JAVA/fwrkmasterreplica.html272
-rw-r--r--docs/gsg_db_rep/JAVA/fwrkpermmessage.html78
-rw-r--r--docs/gsg_db_rep/JAVA/heartbeats.html11
-rw-r--r--docs/gsg_db_rep/JAVA/index.html17
-rw-r--r--docs/gsg_db_rep/JAVA/introduction.html7
-rw-r--r--docs/gsg_db_rep/JAVA/manageblock.html2
-rw-r--r--docs/gsg_db_rep/JAVA/moreinfo.html18
-rw-r--r--docs/gsg_db_rep/JAVA/permmessages.html113
-rw-r--r--docs/gsg_db_rep/JAVA/preface.html4
-rw-r--r--docs/gsg_db_rep/JAVA/processingloop.html2
-rw-r--r--docs/gsg_db_rep/JAVA/repadvantage.html4
-rw-r--r--docs/gsg_db_rep/JAVA/repapp.html17
-rw-r--r--docs/gsg_db_rep/JAVA/repmgr_init_example_c.html21
-rw-r--r--docs/gsg_db_rep/JAVA/rywc.html2
-rw-r--r--docs/gsg_db_rep/JAVA/simpleprogramlisting.html30
-rw-r--r--docs/gsg_db_rep/JAVA/txnapp.html10
83 files changed, 1089 insertions, 1401 deletions
diff --git a/docs/gsg_db_rep/C/Replication-C-GSG.pdf b/docs/gsg_db_rep/C/Replication-C-GSG.pdf
index 419a3634..7315b14b 100644
--- a/docs/gsg_db_rep/C/Replication-C-GSG.pdf
+++ b/docs/gsg_db_rep/C/Replication-C-GSG.pdf
Binary files differ
diff --git a/docs/gsg_db_rep/C/addfeatures.html b/docs/gsg_db_rep/C/addfeatures.html
index 33d58727..65043b74 100644
--- a/docs/gsg_db_rep/C/addfeatures.html
+++ b/docs/gsg_db_rep/C/addfeatures.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/C/apioverview.html b/docs/gsg_db_rep/C/apioverview.html
index 710ba741..4d2c4e5f 100644
--- a/docs/gsg_db_rep/C/apioverview.html
+++ b/docs/gsg_db_rep/C/apioverview.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -124,20 +124,13 @@
</li>
<li>
<p>
- Requires that only one instance of the
- environment handle be used.
- </p>
- </li>
- <li>
- <p>
Upon application startup, a master can be
selected either manually or via elections.
After startup time, however, during the course of
normal operations it is possible for the
replication group to need to locate a new master (due
to network or other hardware related problems,
- for example) and in this scenario elections are
- always used to select the new master.
+ for example).
</p>
</li>
</ul>
diff --git a/docs/gsg_db_rep/C/autoinit.html b/docs/gsg_db_rep/C/autoinit.html
index 3e5c98be..70920037 100644
--- a/docs/gsg_db_rep/C/autoinit.html
+++ b/docs/gsg_db_rep/C/autoinit.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/C/bulk.html b/docs/gsg_db_rep/C/bulk.html
index e2a15081..f910c40b 100644
--- a/docs/gsg_db_rep/C/bulk.html
+++ b/docs/gsg_db_rep/C/bulk.html
@@ -13,7 +13,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/C/c2ctransfer.html b/docs/gsg_db_rep/C/c2ctransfer.html
index 6e6fbd70..51317345 100644
--- a/docs/gsg_db_rep/C/c2ctransfer.html
+++ b/docs/gsg_db_rep/C/c2ctransfer.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/C/elections.html b/docs/gsg_db_rep/C/elections.html
index 016c0540..43ff5c5f 100644
--- a/docs/gsg_db_rep/C/elections.html
+++ b/docs/gsg_db_rep/C/elections.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -102,10 +102,9 @@
</div>
</div>
<p>
- If you want to control the election process, you can declare
- a specific environment to be the master. Note that for the Replication Manager,
- it is only possible to do this at application startup.
- Should the master become unavailable during run-time for any
+ If you want to control the election process, you can
+ declare a specific environment to be the master. Should
+ the master become unavailable during run-time for any
reason, an election is held. The environment that receives
the most number of votes, wins the election and becomes the
master. A machine receives a vote because it has the most
diff --git a/docs/gsg_db_rep/C/electiontimes.html b/docs/gsg_db_rep/C/electiontimes.html
index 037a3547..9502147d 100644
--- a/docs/gsg_db_rep/C/electiontimes.html
+++ b/docs/gsg_db_rep/C/electiontimes.html
@@ -8,13 +8,13 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
<link rel="up" href="repapp.html" title="Chapter 3. The DB Replication Manager" />
- <link rel="prev" href="fwrkpermmessage.html" title="Permanent Message Handling" />
+ <link rel="prev" href="fwrkpermmessage.html" title="Replication Manager Permanent Message Handling" />
<link rel="next" href="fmwrkconnectretry.html" title="Managing Connection Retries" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -158,7 +158,7 @@
<td width="40%" align="right"> <a accesskey="n" href="fmwrkconnectretry.html">Next</a></td>
</tr>
<tr>
- <td width="40%" align="left" valign="top">Permanent Message Handling </td>
+ <td width="40%" align="left" valign="top">Replication Manager Permanent Message Handling </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
diff --git a/docs/gsg_db_rep/C/eventhandling.html b/docs/gsg_db_rep/C/eventhandling.html
new file mode 100644
index 00000000..437f7edd
--- /dev/null
+++ b/docs/gsg_db_rep/C/eventhandling.html
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Event Handling</title>
+ <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
+ <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
+ <link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
+ <link rel="up" href="introduction.html" title="Chapter 1. Introduction" />
+ <link rel="prev" href="permmessages.html" title="Permanent Message Handling" />
+ <link rel="next" href="txnapp.html" title="Chapter 2. Transactional Application" />
+ </head>
+ <body>
+ <div xmlns="" class="navheader">
+ <div class="libver">
+ <p>Library Version 12.1.6.1</p>
+ </div>
+ <table width="100%" summary="Navigation header">
+ <tr>
+ <th colspan="3" align="center">Event Handling</th>
+ </tr>
+ <tr>
+ <td width="20%" align="left"><a accesskey="p" href="permmessages.html">Prev</a> </td>
+ <th width="60%" align="center">Chapter 1. Introduction</th>
+ <td width="20%" align="right"> <a accesskey="n" href="txnapp.html">Next</a></td>
+ </tr>
+ </table>
+ <hr />
+ </div>
+ <div class="sect1" lang="en" xml:lang="en">
+ <div class="titlepage">
+ <div>
+ <div>
+ <h2 class="title" style="clear: both"><a id="eventhandling"></a>Event Handling</h2>
+ </div>
+ </div>
+ </div>
+ <p>
+ The replication system is capable of reporting a great many
+ events to which your code might need to respond. To track and
+ respond to these events, you implement a
+ <span>callback</span>
+
+ whose function it is to respond to events that happen within
+ the DB library.
+ </p>
+ <p>
+ Note that this callback is usable for events beyond those
+ required for replication purposes. In this section, however, we
+ only discuss some of the replication-specific events.
+ </p>
+ <p>
+ The callback is required to determine which event has been
+ passed to it, and then take action depending on the event.
+ </p>
+ <p>
+ Some of the more commonly handled replication events are
+ described below. For a complete list of events, see the
+
+ <span>
+ <code class="methodname">DB_ENV-&gt;set_event_notify()</code>
+ method in the <em class="citetitle">Berkeley DB C API Reference Guide</em>.
+ </span>
+
+
+ </p>
+ <div class="itemizedlist">
+ <ul type="disc">
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_CLIENT</code>
+
+ </p>
+ <p>
+ The local environment is now a replica.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_LOCAL_SITE_REMOVED</code>
+
+ </p>
+ <p>
+ The local Replication Manager site has been removed from the group.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_MASTER</code>
+
+ </p>
+ <p>
+ The local environment is now a master.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_NEWMASTER</code>
+
+ </p>
+ <p>
+ An election was held and a new environment was made a
+ master. However, the current environment
+ <span class="emphasis"><em>is not</em></span> the master. This event exists so
+ that you can cause your code to take some unique action
+ in the event that the replication groups switches
+ masters.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_PERM_FAILED</code>
+
+ </p>
+ <p>
+ The Replication Manager did not receive enough acknowledgements to
+ ensure the transaction's durability within the
+ replicationg group. The Replication Manager has therefore flushed
+ the transaction to the master's local disk for storage.
+ </p>
+ <p>
+ How the Replication Manager knows whether the acknowledgements it has
+ received is determined by the acknowledgement policy you have set
+ for your applicaton. See
+ <a class="xref" href="fwrkpermmessage.html#fmwrkpermpolicy" title="Identifying Permanent Message Policies">Identifying Permanent Message Policies</a>
+ for more information.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_SITE_ADDED</code>
+
+ </p>
+ <p>
+ A new Replication Manager site has joined the replication group.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_SITE_REMOVED</code>
+
+ </p>
+ <p>
+ An existing Replication Manager site has been removed from the replication group.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_STARTUPDONE</code>
+
+ </p>
+ <p>
+ The replica has completed startup synchronization and
+ is now processing log records received from the master.
+ </p>
+ </li>
+ </ul>
+ </div>
+ <p>
+ For an example of how to use this callback, see
+ <a class="xref" href="fwrkmasterreplica.html#determinestate" title="Determining State">Determining State</a>
+ </p>
+ </div>
+ <div class="navfooter">
+ <hr />
+ <table width="100%" summary="Navigation footer">
+ <tr>
+ <td width="40%" align="left"><a accesskey="p" href="permmessages.html">Prev</a> </td>
+ <td width="20%" align="center">
+ <a accesskey="u" href="introduction.html">Up</a>
+ </td>
+ <td width="40%" align="right"> <a accesskey="n" href="txnapp.html">Next</a></td>
+ </tr>
+ <tr>
+ <td width="40%" align="left" valign="top">Permanent Message Handling </td>
+ <td width="20%" align="center">
+ <a accesskey="h" href="index.html">Home</a>
+ </td>
+ <td width="40%" align="right" valign="top"> Chapter 2. Transactional Application</td>
+ </tr>
+ </table>
+ </div>
+ </body>
+</html>
diff --git a/docs/gsg_db_rep/C/exampledoloop.html b/docs/gsg_db_rep/C/exampledoloop.html
index 94a64edb..9696e811 100644
--- a/docs/gsg_db_rep/C/exampledoloop.html
+++ b/docs/gsg_db_rep/C/exampledoloop.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -82,7 +82,7 @@
</p>
<pre class="programlisting">/*
- * File: ex_rep_gsg_repmgr.c
+ * File: rep_mgr_gsg.c
*/
#include &lt;stdlib.h&gt;
@@ -112,7 +112,7 @@ const char *progname = "ex_rep_gsg_repmgr";
int create_env(const char *, DB_ENV **);
int env_init(DB_ENV *, const char *);
int doloop (DB_ENV *);
-static int print_stocks(DBC *);
+static int print_stocks(DB *);
<strong class="userinput"><code>void *event_callback(DB_ENV *, u_int32_t, void *);</code></strong> </pre>
<p>
In our <code class="function">main()</code> function, most of what we
@@ -164,6 +164,8 @@ main(int argc, char *argv[])
home = optarg;
break;
/* Set the host and port used by this environment */
+ case 'L':
+ is_group_creator = 1; /* FALLTHROUGH */
case 'l':
host = strtok(optarg, ":");
if ((portstr = strtok(NULL, ":")) == NULL) {
@@ -182,7 +184,7 @@ main(int argc, char *argv[])
dbsite-&gt;set_config(dbsite, DB_GROUP_CREATOR, 1);
if ((ret = dbsite-&gt;close(dbsite)) != 0) {
- dbenv-&gt;(dbenv, ret, "DB_SITE-&gt;close");
+ dbenv-&gt;err(dbenv, ret, "DB_SITE-&gt;close");
goto err;
}
local_is_set = 1;
@@ -201,8 +203,7 @@ main(int argc, char *argv[])
port = (unsigned short)atoi(portstr);
if ((dbenv-&gt;repmgr_site(dbenv, host, port, &amp;dbsite,
0)) != 0) {
- fprintf(stderr,
- "Could not add site %s.\n", host);
+ dbenv-&gt;err(dbenv, ret, "DB_ENV-&gt;repmgr_site");
goto err;
}
dbenv-&gt;set_config(dbsite, DB_BOOTSTRAP_HELPER, 1);
diff --git a/docs/gsg_db_rep/C/fmwrkconnectretry.html b/docs/gsg_db_rep/C/fmwrkconnectretry.html
index 72e20d82..28e54998 100644
--- a/docs/gsg_db_rep/C/fmwrkconnectretry.html
+++ b/docs/gsg_db_rep/C/fmwrkconnectretry.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/C/fwrkmasterreplica.html b/docs/gsg_db_rep/C/fwrkmasterreplica.html
index 23c7a184..5be81caf 100644
--- a/docs/gsg_db_rep/C/fwrkmasterreplica.html
+++ b/docs/gsg_db_rep/C/fwrkmasterreplica.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -106,246 +106,30 @@
</div>
</div>
<p>
- In order to determine whether your code is
- running as a master or a replica, you implement a
- callback whose function it is to respond to
- events that happen within the DB library.
- Note that these events are raised whenever the state is established.
- For example, when the current environment becomes a client —
- including at application startup — the
- <code class="literal">DB_EVENT_REP_CLIENT</code> event is raised. Also, when an
- election is held and a replica is elected to be a master, the
- <code class="literal">DB_EVENT_REP_MASTER</code> event is raised on the newly elected master and the
- <code class="literal">DB_EVENT_REP_NEWMASTER</code> is raised on the other replicas.
- </p>
+ In order to determine whether your code is running as a
+ master or a replica, you implement an event handling
+ callback, which we initially describe in
+ <a class="xref" href="eventhandling.html" title="Event Handling">Event Handling</a>.
+ When the current environment becomes a client —
+ including at application startup — the
+ <code class="literal">DB_EVENT_REP_CLIENT</code> event is raised.
+ When an election is held and a replica is elected to be a
+ master, the <code class="literal">DB_EVENT_REP_MASTER</code> event is
+ raised on the newly elected master and the
+ <code class="literal">DB_EVENT_REP_NEWMASTER</code> is raised on the
+ other replicas.
+ </p>
<p>
- Note that this callback is usable for events beyond
- those required for replication purposes. In this
- section, however, we only discuss the
- replication-specific events.
- </p>
+ The implementation of the event handling callback is fairly
+ simple. First you pass a structure to the environment
+ handle that you can use to record the environment's state,
+ and then you implement a switch statement within the
+ callback that you use to record the current state,
+ depending on the arriving event.
+ </p>
<p>
- The callback is required to determine
- which event has been passed to it, and then take
- action depending on the event. For replication,
- the events that we care about are:
- </p>
- <p>
- Some of the more commonly handled events are
- described below. For a complete list of events, see
- the
-
- <span>
- <code class="methodname">DB_ENV-&gt;set_event_notify()</code>
- method in the <em class="citetitle">Berkeley DB C API Reference Guide</em>.
- </span>
-
-
- </p>
- <div class="itemizedlist">
- <ul type="disc">
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_CLIENT</code>
-
- </p>
- <p>
- The local environment is now a replica.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_CONNECT_BROKEN</code>
-
- </p>
- <p>
- A previously established connection between
- two sites in the replication group has been
- broken.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_CONNECT_ESTD</code>
-
- </p>
- <p>
- A connection has been established between
- two sites in the replication group.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_CONNECT_RETRY_ESTABLISHED</code>
-
- </p>
- <p>
- An attempt was made to establish a connection
- to a known remote site, but the connection
- attempt failed.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_DUPMASTER</code>
-
- </p>
- <p>
- A duplicate master has been discovered in the
- replication group.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_ELECTED</code>
-
- </p>
- <p>
- The local site has just won an election and
- is now the master. Your code should now
- reconfigure itself to operation as a master
- site.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_ELECTION_FAILED</code>
-
- </p>
- <p>
- The local site's attempt to initiate or
- participate in a replication master election
- failed, due to the lack of timely message
- response from a sufficient number of remote
- sites.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_ELECTION_STARTED</code>
- </p>
- <p>
- Replication Manager has started an election to choose a master site.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_LOCAL_SITE_REMOVED</code>
-
- </p>
- <p>
- The local site has been removed from the group.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_NEWMASTER</code>
-
- </p>
- <p>
- An election was held and a new environment was made a
- master. However, the current environment <span class="emphasis"><em>is
- not</em></span> the master. This event exists so that
- you can cause your code to take some unique action in the
- event that the replication groups switches masters.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_MASTER</code>
-
- </p>
- <p>
- The local environment is now a master.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_MASTER_FAILURE</code>
-
- </p>
- <p>
- The connection to the remote master replication site has failed.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_PERM_FAILED</code>
-
- </p>
- <p>
- The Replication Manager did not receive enough acknowledgements to
- ensure the transaction's durability within the replicationg group.
- The Replication Manager has therefore flushed the transaction to
- the master's local disk for storage.
- </p>
- <p>
- How the Replication Manager knows whether the acknowledgements it
- has received is determined by the ack policy you have set for your
- applicaton. See <a class="xref" href="fwrkpermmessage.html#fmwrkpermpolicy" title="Identifying Permanent Message Policies">Identifying Permanent Message Policies</a>
- for more information.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_SITE_ADDED</code>
-
- </p>
- <p>
- A new site has joined the replication group.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_SITE_REMOVED</code>
-
- </p>
- <p>
- An existing site has been removed from the replication group.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_STARTUPDONE</code>
-
- </p>
- <p>
- The replica has completed startup
- synchronization and is now processing
- log records received from the master.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_WRITE_FAILED</code>
-
- </p>
- <p>
- A Berkeley DB write to stable storage failed.
- </p>
- </li>
- </ul>
- </div>
- <p>
- Note that these events are raised whenever the
- state is established. That is, when the current
- environment becomes a replica, and that includes
- at application startup, the event is raised.
- Also, when an election is held and a replica is elected to be a
- master, then the event occurs.
- </p>
- <p>
- The implementation of this callback is fairly
- simple. First you pass a structure to the
- environment handle that you can use to record the
- environment's state, and then you implement a switch
- statement within the callback that you use to
- record the current state, depending on the
- arriving event.
- </p>
- <p>
- For example:
- </p>
+ For example:
+ </p>
<pre class="programlisting">#include &lt;db.h&gt;
/* Forward declaration */
void *event_callback(DB_ENV *, u_int32_t, void *);
@@ -383,9 +167,9 @@ dbenv-&gt;app_private = &amp;my_app_data;
*/
dbenv-&gt;set_event_notify(dbenv, event_callback); </pre>
<p>
- That done, we still need to implement the callback itself. This
- implementation can be fairly trivial.
-</p>
+ That done, we still need to implement the callback itself. This
+ implementation can be fairly trivial.
+ </p>
<pre class="programlisting">/*
* A callback used to determine whether the local environment is a
* replica or a master. This is called by the Replication Manager
@@ -417,19 +201,19 @@ event_callback(DB_ENV *dbenv, u_int32_t which, void *info)
}
} </pre>
<p>
- Notice how we access the
- <code class="literal">APP_DATA</code> information using the environment
- handle's <code class="literal">app_private</code> data member. We also ignore
- the <code class="literal">DB_EVENT_REP_NEWMASTER</code> and
- <code class="literal">DB_EVENT_REP_STARTUPDONE</code> cases since these are not
- relevant for simple replicated applications.
-</p>
+ Notice how we access the <code class="literal">APP_DATA</code>
+ information using the environment handle's
+ <code class="literal">app_private</code> data member. We also ignore the
+ <code class="literal">DB_EVENT_REP_NEWMASTER</code> and
+ <code class="literal">DB_EVENT_REP_STARTUPDONE</code> cases since these
+ are not relevant for simple replicated applications.
+ </p>
<p>
- Of course, this only gives us the current state of the environment. We
- still need the code that determines what to do when the environment
- changes state and how to behave depending on the state (described
- in the next section).
-</p>
+ Of course, this only gives us the current state of the
+ environment. We still need the code that determines what to do
+ when the environment changes state and how to behave depending
+ on the state (described in the next section).
+ </p>
</div>
</div>
<div class="navfooter">
diff --git a/docs/gsg_db_rep/C/fwrkpermmessage.html b/docs/gsg_db_rep/C/fwrkpermmessage.html
index 4852afe6..be455ec4 100644
--- a/docs/gsg_db_rep/C/fwrkpermmessage.html
+++ b/docs/gsg_db_rep/C/fwrkpermmessage.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>Permanent Message Handling</title>
+ <title>Replication Manager Permanent Message Handling</title>
<link rel="stylesheet" href="gettingStarted.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
@@ -14,11 +14,11 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
- <th colspan="3" align="center">Permanent Message Handling</th>
+ <th colspan="3" align="center">Replication Manager Permanent Message Handling</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="repmgr_init_example_c.html">Prev</a> </td>
@@ -32,7 +32,7 @@
<div class="titlepage">
<div>
<div>
- <h2 class="title" style="clear: both"><a id="fwrkpermmessage"></a>Permanent Message Handling</h2>
+ <h2 class="title" style="clear: both"><a id="fwrkpermmessage"></a>Replication Manager Permanent Message Handling</h2>
</div>
</div>
</div>
@@ -140,41 +140,6 @@
<ul type="disc">
<li>
<p>
- <code class="literal">DB_REPMGR_ACKS_NONE</code>
-
- </p>
- <p>
- No permanent message acknowledgments are required. If
- this policy is selected, permanent message handling is
- essentially "turned off." That is, the master will
- never wait for replica acknowledgments. In this case,
- transaction log data is either flushed or not strictly
- depending on the type of commit that is being performed
- (synchronous or asynchronous).
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_REPMGR_ACKS_ONE</code>
-
- </p>
- <p>
- At least one replica must acknowledge the permanent
- message within the timeout period.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_REPMGR_ACKS_ONE_PEER</code>
-
- </p>
- <p>
- At least one electable peer must acknowledge the permanent
- message within the timeout period.
- </p>
- </li>
- <li>
- <p>
<code class="literal">DB_REPMGR_ACKS_ALL</code>
</p>
@@ -214,6 +179,41 @@
</li>
<li>
<p>
+ <code class="literal">DB_REPMGR_ACKS_NONE</code>
+
+ </p>
+ <p>
+ No permanent message acknowledgments are required. If
+ this policy is selected, permanent message handling is
+ essentially "turned off." That is, the master will
+ never wait for replica acknowledgments. In this case,
+ transaction log data is either flushed or not strictly
+ depending on the type of commit that is being performed
+ (synchronous or asynchronous).
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_REPMGR_ACKS_ONE</code>
+
+ </p>
+ <p>
+ At least one replica must acknowledge the permanent
+ message within the timeout period.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_REPMGR_ACKS_ONE_PEER</code>
+
+ </p>
+ <p>
+ At least one electable peer must acknowledge the permanent
+ message within the timeout period.
+ </p>
+ </li>
+ <li>
+ <p>
<code class="literal">DB_REPMGR_ACKS_QUORUM</code>
</p>
@@ -318,7 +318,7 @@
dbenv-&gt;rep_set_timeout(dbenv, DB_REP_ACK_TIMEOUT, 500);</code></strong>
/* Collect the command line options */
- while ((ch = getopt(argc, argv, "h:<strong class="userinput"><code>l:n:p:r:</code></strong>")) != EOF)
+ while ((ch = getopt(argc, argv, "h:<strong class="userinput"><code>l:L:p:r:</code></strong>")) != EOF)
... </pre>
</div>
diff --git a/docs/gsg_db_rep/C/heartbeats.html b/docs/gsg_db_rep/C/heartbeats.html
index 6720a240..c215f2f1 100644
--- a/docs/gsg_db_rep/C/heartbeats.html
+++ b/docs/gsg_db_rep/C/heartbeats.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -60,9 +60,10 @@
method.
</span>
-
- You must also provide the method a value representing the period between heartbeats in microseconds. Note that the heartbeat is sent only if the
- system is idle.
+
+ You must also provide the method a value representing the
+ period between heartbeats in microseconds. Note that the
+ heartbeat is sent only if the system is idle.
</p>
<p>
On the replica, you configure the application to listen
diff --git a/docs/gsg_db_rep/C/index.html b/docs/gsg_db_rep/C/index.html
index 7ca8f8a4..31f6c03a 100644
--- a/docs/gsg_db_rep/C/index.html
+++ b/docs/gsg_db_rep/C/index.html
@@ -12,7 +12,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -30,11 +30,11 @@
<div class="titlepage">
<div>
<div>
- <h1 class="title"><a id="idp51896"></a>Getting Started with Replicated Berkeley DB Applications</h1>
+ <h1 class="title"><a id="idp11264"></a>Getting Started with Replicated Berkeley DB Applications</h1>
</div>
<div>
<div class="legalnotice">
- <a id="idp68872"></a>
+ <a id="idp313776"></a>
<p class="legalnotice-title">
<b>Legal Notice</b>
</p>
@@ -64,7 +64,7 @@
<p>
To obtain a copy of this document's original source code, please
submit a request to the Oracle Technology Network forum at:
- <a class="ulink" href="http://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=271</a>
+ <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=271</a>
</p>
@@ -72,7 +72,7 @@
</div>
</div>
<div>
- <p class="pubdate">5/11/2012</p>
+ <p class="pubdate">2/17/2015</p>
</div>
</div>
<hr />
@@ -220,6 +220,11 @@
</dt>
</dl>
</dd>
+ <dt>
+ <span class="sect1">
+ <a href="eventhandling.html">Event Handling</a>
+ </span>
+ </dt>
</dl>
</dd>
<dt>
@@ -318,7 +323,7 @@
</dt>
<dt>
<span class="sect1">
- <a href="fwrkpermmessage.html">Permanent Message Handling</a>
+ <a href="fwrkpermmessage.html">Replication Manager Permanent Message Handling</a>
</span>
</dt>
<dd>
diff --git a/docs/gsg_db_rep/C/introduction.html b/docs/gsg_db_rep/C/introduction.html
index b5a5e158..04918750 100644
--- a/docs/gsg_db_rep/C/introduction.html
+++ b/docs/gsg_db_rep/C/introduction.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -144,6 +144,11 @@
</dt>
</dl>
</dd>
+ <dt>
+ <span class="sect1">
+ <a href="eventhandling.html">Event Handling</a>
+ </span>
+ </dt>
</dl>
</div>
<p>
@@ -301,7 +306,7 @@
a couple of caveats. First, the databases maintained in a replicated environment
must reside either in the <code class="literal">ENV_HOME</code>
directory, or in the directory identified by the
- <code class="methodname">DB_ENV-&gt;set_data_dir()</code>
+ <code class="methodname">DB_ENV-&gt;add_data_dir()</code>
method. Unlike non-replication applications, you cannot place your
diff --git a/docs/gsg_db_rep/C/manageblock.html b/docs/gsg_db_rep/C/manageblock.html
index e0911518..9230b42a 100644
--- a/docs/gsg_db_rep/C/manageblock.html
+++ b/docs/gsg_db_rep/C/manageblock.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/C/moreinfo.html b/docs/gsg_db_rep/C/moreinfo.html
index a2bd0a41..12e71e7f 100644
--- a/docs/gsg_db_rep/C/moreinfo.html
+++ b/docs/gsg_db_rep/C/moreinfo.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -54,7 +54,7 @@
<ul type="disc">
<li>
<p>
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/gsg_txn/C/index.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/gsg_txn/C/index.html" target="_top">
Getting Started with Transaction Processing for C
</a>
@@ -67,7 +67,7 @@
</li>
<li>
<p>
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/gsg/C/index.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/gsg/C/index.html" target="_top">
Getting Started with Berkeley DB for C
</a>
@@ -81,7 +81,7 @@
</li>
<li>
<p>
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/programmer_reference/index.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/programmer_reference/index.html" target="_top">
Berkeley DB Programmer's Reference Guide
</a>
</p>
@@ -89,7 +89,7 @@
<li>
<p>
<span>
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/api_reference/C/frame_main.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/api_reference/C/frame_main.html" target="_top">
Berkeley DB C API Reference Guide
</a>
@@ -117,7 +117,7 @@
downloads, visit
- <a class="ulink" href="http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html" target="_top">http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html</a>.
+ <a class="ulink" href="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html" target="_top">http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html</a>.
</p>
</span>
<div class="sect2" lang="en" xml:lang="en">
@@ -132,8 +132,8 @@
You can post your comments and questions at the Oracle
Technology (OTN) forum for
<span>
- Oracle Berkeley DB at: <a class="ulink" href="http://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=271</a>,
- or for Oracle Berkeley DB High Availability at: <a class="ulink" href="http://forums.oracle.com/forums/forum.jspa?forumID=272" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=272</a>.
+ Oracle Berkeley DB at: <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=271</a>,
+ or for Oracle Berkeley DB High Availability at: <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=272" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=272</a>.
</span>
diff --git a/docs/gsg_db_rep/C/permmessages.html b/docs/gsg_db_rep/C/permmessages.html
index af15aa46..a0e4a3b6 100644
--- a/docs/gsg_db_rep/C/permmessages.html
+++ b/docs/gsg_db_rep/C/permmessages.html
@@ -9,12 +9,12 @@
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
<link rel="up" href="introduction.html" title="Chapter 1. Introduction" />
<link rel="prev" href="elections.html" title="Holding Elections" />
- <link rel="next" href="txnapp.html" title="Chapter 2. Transactional Application" />
+ <link rel="next" href="eventhandling.html" title="Event Handling" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -23,7 +23,7 @@
<tr>
<td width="20%" align="left"><a accesskey="p" href="elections.html">Prev</a> </td>
<th width="60%" align="center">Chapter 1. Introduction</th>
- <td width="20%" align="right"> <a accesskey="n" href="txnapp.html">Next</a></td>
+ <td width="20%" align="right"> <a accesskey="n" href="eventhandling.html">Next</a></td>
</tr>
</table>
<hr />
@@ -90,29 +90,29 @@
message acknowledgment.
</p>
<p>
- For the master (again, using the Replication Manager), things are a little more complicated than
- simple message acknowledgment. Usually in a replicated
- application, the master commits transactions
- asynchronously; that is, the commit operation does not
- block waiting for log data to be flushed to disk before
- returning. So when a master is managing permanent
+ For the master (again, using the Replication Manager), things are a
+ little more complicated than simple message acknowledgment.
+ Usually in a replicated application, the master commits
+ transactions asynchronously; that is, the commit operation
+ does not block waiting for log data to be flushed to disk
+ before returning. So when a master is managing permanent
messages, it typically blocks the committing thread
immediately before <code class="methodname">commit()</code>
- returns. The thread then waits for acknowledgments from
- its replicas. If it receives enough acknowledgments, it
+ returns. The thread then waits for acknowledgments from its
+ replicas. If it receives enough acknowledgments, it
continues to operate as normal.
</p>
<p>
- If the master does not
- receive message acknowledgments — or, more likely, it does not receive
+ If the master does not receive message acknowledgments
+ — or, more likely, it does not receive
<span class="emphasis"><em>enough</em></span> acknowledgments — the
committing thread flushes its log data to disk and then
continues operations as normal. The master application can
do this because replicas that fail to handle a message, for
whatever reason, will eventually catch up to the master. So
by flushing the transaction logs to disk, the master is
- ensuring that the data modifications have made it to
- stable storage in one location (its own hard drive).
+ ensuring that the data modifications have made it to stable
+ storage in one location (its own hard drive).
</p>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
@@ -195,7 +195,7 @@
replicas.
</p>
<p>
- That said, it is important to remember that
+ That said, remember that
managing permanent messages involves a fair amount
of network traffic. The messages must be sent to
the replicas and the replicas must acknowledge
@@ -268,85 +268,16 @@
depends on which API you are using to implement
replication. If you are using the Replication Manager, then
permanent message handling is configured using
- policies that you specify to the framework. In
- this case, you can configure your application
- to:
- </p>
- <div class="itemizedlist">
- <ul type="disc">
- <li>
- <p>
- Ignore permanent messages (the master
- does not wait for acknowledgments).
- </p>
- </li>
- <li>
- <p>
- Require acknowledgments from a
- quorum. A quorum is reached when
- acknowledgments are received from the
- minimum number of electable
- peers needed to ensure that
- the record remains durable if
- an election is held.
- </p>
- <p>
- An <span class="emphasis"><em>electable peer</em></span> is any other
- site that potentially can be elected master.
- </p>
- <p>
- The goal here is to be
- absolutely sure the record is
- durable. The master wants to
- hear from enough electable
- peer that they have
- committed the record so that if
- an election is held, the master
- knows the record will exist even
- if a new master is selected.
- </p>
- <p>
- This is the default policy.
- </p>
- </li>
- <li>
- <p>
- Require an acknowledgment from at least one replica.
- </p>
- </li>
- <li>
- <p>
- Require acknowledgments from
- all replicas.
- </p>
- </li>
- <li>
- <p>
- Require an acknowledgment from at least one electable peer.
- </p>
- </li>
- <li>
- <p>
- Require acknowledgments from all electable peers.
- </p>
- </li>
- </ul>
- </div>
- <p>
- Note that the Replication Manager simply flushes its transaction
- logs and moves on if a permanent message is not
- sufficiently acknowledged.
- </p>
- <p>
- For details on permanent message handling with the
- Replication Manager, see <a class="xref" href="fwrkpermmessage.html" title="Permanent Message Handling">Permanent Message Handling</a>.
+ policies that you specify to the framework.
+ For a list of these policies, see
+ <a class="xref" href="fwrkpermmessage.html" title="Replication Manager Permanent Message Handling">Replication Manager Permanent Message Handling</a>.
</p>
<p>
If these policies are not sufficient for your
needs, or if you want your application to take more
corrective action than simply flushing log buffers
in the event of an unsuccessful commit, then you
- must use implement replication using the Base APIs.
+ must implement replication using the Base APIs.
</p>
<p>
When using the Base APIs, messages are
@@ -395,14 +326,14 @@
<td width="20%" align="center">
<a accesskey="u" href="introduction.html">Up</a>
</td>
- <td width="40%" align="right"> <a accesskey="n" href="txnapp.html">Next</a></td>
+ <td width="40%" align="right"> <a accesskey="n" href="eventhandling.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Holding Elections </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
- <td width="40%" align="right" valign="top"> Chapter 2. Transactional Application</td>
+ <td width="40%" align="right" valign="top"> Event Handling</td>
</tr>
</table>
</div>
diff --git a/docs/gsg_db_rep/C/preface.html b/docs/gsg_db_rep/C/preface.html
index 2cca9de3..7819f901 100644
--- a/docs/gsg_db_rep/C/preface.html
+++ b/docs/gsg_db_rep/C/preface.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -64,7 +64,7 @@
</div>
<p>
This document describes how to write replicated applications for
- Berkeley DB 11<span class="emphasis"><em>g</em></span> Release 2 (library version 11.2.5.3). The APIs used to
+ Berkeley DB 12<span class="emphasis"><em>c</em></span> Release 1 (library version 12.1.6.1). The APIs used to
implement replication in your application are described here. This
book describes the concepts surrounding replication, the scenarios
under which you might choose to use it, and the architectural
diff --git a/docs/gsg_db_rep/C/processingloop.html b/docs/gsg_db_rep/C/processingloop.html
index b47af38f..b5fe2bfa 100644
--- a/docs/gsg_db_rep/C/processingloop.html
+++ b/docs/gsg_db_rep/C/processingloop.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/C/rep_init_code.html b/docs/gsg_db_rep/C/rep_init_code.html
index 627a8ff2..56894466 100644
--- a/docs/gsg_db_rep/C/rep_init_code.html
+++ b/docs/gsg_db_rep/C/rep_init_code.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -130,7 +130,7 @@
* host/port network address.
*/
if ((ret = dbenv-&gt;repmgr_site(dbenv, listen_host, listen_port,
- &amp;dbsite;, 0)) != 0) {
+ &amp;dbsite, 0)) != 0) {
fprintf(stderr, "Could not set local address (%d).\n", ret);
goto err;
}
diff --git a/docs/gsg_db_rep/C/repadvantage.html b/docs/gsg_db_rep/C/repadvantage.html
index 1e4942a6..0eb7f762 100644
--- a/docs/gsg_db_rep/C/repadvantage.html
+++ b/docs/gsg_db_rep/C/repadvantage.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -153,7 +153,7 @@
your replication group.
</p>
<p>
- For more information, see <a class="xref" href="fwrkpermmessage.html" title="Permanent Message Handling">Permanent Message Handling</a>.
+ For more information, see <a class="xref" href="fwrkpermmessage.html" title="Replication Manager Permanent Message Handling">Replication Manager Permanent Message Handling</a>.
</p>
</li>
</ul>
diff --git a/docs/gsg_db_rep/C/repapp.html b/docs/gsg_db_rep/C/repapp.html
index ee0980d8..8546ba64 100644
--- a/docs/gsg_db_rep/C/repapp.html
+++ b/docs/gsg_db_rep/C/repapp.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -78,7 +78,7 @@
</dt>
<dt>
<span class="sect1">
- <a href="fwrkpermmessage.html">Permanent Message Handling</a>
+ <a href="fwrkpermmessage.html">Replication Manager Permanent Message Handling</a>
</span>
</dt>
<dd>
@@ -175,10 +175,8 @@
environment's priority, setting the TCP/IP address that
this replication environment will use for incoming
replication messages, identifying TCP/IP addresses of other
- replication environments, setting the number of replication
- environments in the replication group, and so forth. These
- actions are discussed throughout the remainder of this
- chapter.
+ replication environments, and so forth. These actions are
+ discussed throughout the remainder of this chapter.
</p>
</li>
<li>
@@ -220,13 +218,6 @@
</li>
</ol>
</div>
- <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
- <h3 class="title">Note</h3>
- <p>
- The Replication Manager allows you to only use one environment handle per
- process.
- </p>
- </div>
<p>
When you are ready to shut down your application:
</p>
diff --git a/docs/gsg_db_rep/C/repmgr_init_example_c.html b/docs/gsg_db_rep/C/repmgr_init_example_c.html
index 2f7588ef..57faea33 100644
--- a/docs/gsg_db_rep/C/repmgr_init_example_c.html
+++ b/docs/gsg_db_rep/C/repmgr_init_example_c.html
@@ -9,12 +9,12 @@
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
<link rel="up" href="repapp.html" title="Chapter 3. The DB Replication Manager" />
<link rel="prev" href="rep_init_code.html" title="Starting and Stopping Replication" />
- <link rel="next" href="fwrkpermmessage.html" title="Permanent Message Handling" />
+ <link rel="next" href="fwrkpermmessage.html" title="Replication Manager Permanent Message Handling" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -96,7 +96,7 @@
<span>ex_rep_gsg_simple</span>
code to a new file called
- <code class="literal">ex_rep_gsg_repmgr.c</code>.
+ <code class="literal">rep_mgr_gsg.c</code>.
<span>
We then make the corresponding change to the program name.
@@ -105,7 +105,7 @@
</p>
<pre class="programlisting">/*
- <strong class="userinput"><code>* File: ex_rep_gsg_repmgr.c</code></strong>
+ <strong class="userinput"><code>* File: rep_mgr_gsg.c</code></strong>
*/
#include &lt;stdlib.h&gt;
@@ -128,7 +128,7 @@ const char *progname = <strong class="userinput"><code>"ex_rep_gsg_repmgr";</cod
int create_env(const char *, DB_ENV **);
int env_init(DB_ENV *, const char *);
int doloop (DB_ENV *);
-int print_stocks(DBC *); </pre>
+int print_stocks(DB *); </pre>
<p>
Next we update our usage function. The application will continue to
accept the <code class="literal">-h</code> parameter so that we can identify
@@ -207,7 +207,7 @@ main(int argc, char *argv[])
const char *home;
char ch, <strong class="userinput"><code>*host, *portstr</code></strong>;
int ret, <strong class="userinput"><code>local_is_set, is_group_creator</code></strong>;
- <strong class="userinput"><code>u_int32_t port</code></strong>;
+ <strong class="userinput"><code>u_int16_t port</code></strong>;
dbenv = NULL;
@@ -238,6 +238,8 @@ main(int argc, char *argv[])
home = optarg;
break;
<strong class="userinput"><code>/* Set the host and port used by this environment */
+ case 'L':
+ is_group_creator = 1; /* FALLTHROUGH */
case 'l':
host = strtok(optarg, ":");
if ((portstr = strtok(NULL, ":")) == NULL) {
@@ -275,8 +277,7 @@ main(int argc, char *argv[])
port = (unsigned short)atoi(portstr);
if ((dbenv-&gt;repmgr_site(dbenv, host, port, &amp;dbsite,
0)) != 0) {
- fprintf(stderr,
- "Could not add site %s.\n", host);
+ dbenv-&gt;err(dbenv, ret, "DB_ENV-&gt;repmgr_site");
goto err;
}
dbenv-&gt;set_config(dbsite, DB_BOOTSTRAP_HELPER, 1);
@@ -389,7 +390,7 @@ env_init(DB_ENV *dbenv, const char *home)
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
- <td width="40%" align="right" valign="top"> Permanent Message Handling</td>
+ <td width="40%" align="right" valign="top"> Replication Manager Permanent Message Handling</td>
</tr>
</table>
</div>
diff --git a/docs/gsg_db_rep/C/rywc.html b/docs/gsg_db_rep/C/rywc.html
index a20382b6..44bacdfd 100644
--- a/docs/gsg_db_rep/C/rywc.html
+++ b/docs/gsg_db_rep/C/rywc.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/C/simpleprogramlisting.html b/docs/gsg_db_rep/C/simpleprogramlisting.html
index eab18d87..f3e8e616 100644
--- a/docs/gsg_db_rep/C/simpleprogramlisting.html
+++ b/docs/gsg_db_rep/C/simpleprogramlisting.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -117,7 +117,7 @@
</p>
<a id="c_simpletxn1"></a>
<pre class="programlisting">/*
- * File: ex_rep_gsg_simple.c
+ * File: simple_txn.c
*/
#include &lt;stdio.h&gt;
diff --git a/docs/gsg_db_rep/C/txnapp.html b/docs/gsg_db_rep/C/txnapp.html
index a1d5f9c1..fe3c2c32 100644
--- a/docs/gsg_db_rep/C/txnapp.html
+++ b/docs/gsg_db_rep/C/txnapp.html
@@ -8,20 +8,20 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
<link rel="up" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
- <link rel="prev" href="permmessages.html" title="Permanent Message Handling" />
+ <link rel="prev" href="eventhandling.html" title="Event Handling" />
<link rel="next" href="simpleprogramlisting.html" title="Program Listing" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Chapter 2. Transactional Application</th>
</tr>
<tr>
- <td width="20%" align="left"><a accesskey="p" href="permmessages.html">Prev</a> </td>
+ <td width="20%" align="left"><a accesskey="p" href="eventhandling.html">Prev</a> </td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="simpleprogramlisting.html">Next</a></td>
</tr>
@@ -133,7 +133,7 @@
usage. In it, we use entirely fictitious stock market
symbols and price values.
</p>
- <pre class="programlisting">&gt; ./ex_rep_gsg_simple -h env_home_dir
+ <pre class="programlisting">&gt; ./simple_txn -h env_home_dir
QUOTESERVER&gt; stock1 88
QUOTESERVER&gt; stock2 .08
QUOTESERVER&gt;
@@ -157,12 +157,12 @@ QUOTESERVER&gt; quit
<hr />
<table width="100%" summary="Navigation footer">
<tr>
- <td width="40%" align="left"><a accesskey="p" href="permmessages.html">Prev</a> </td>
+ <td width="40%" align="left"><a accesskey="p" href="eventhandling.html">Prev</a> </td>
<td width="20%" align="center"> </td>
<td width="40%" align="right"> <a accesskey="n" href="simpleprogramlisting.html">Next</a></td>
</tr>
<tr>
- <td width="40%" align="left" valign="top">Permanent Message Handling </td>
+ <td width="40%" align="left" valign="top">Event Handling </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
diff --git a/docs/gsg_db_rep/CXX/Replication-CXX-GSG.pdf b/docs/gsg_db_rep/CXX/Replication-CXX-GSG.pdf
index e281470a..90ad834d 100644
--- a/docs/gsg_db_rep/CXX/Replication-CXX-GSG.pdf
+++ b/docs/gsg_db_rep/CXX/Replication-CXX-GSG.pdf
Binary files differ
diff --git a/docs/gsg_db_rep/CXX/addfeatures.html b/docs/gsg_db_rep/CXX/addfeatures.html
index bfea3403..9d11c1e3 100644
--- a/docs/gsg_db_rep/CXX/addfeatures.html
+++ b/docs/gsg_db_rep/CXX/addfeatures.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/CXX/apioverview.html b/docs/gsg_db_rep/CXX/apioverview.html
index a50bf5ab..8a5425e9 100644
--- a/docs/gsg_db_rep/CXX/apioverview.html
+++ b/docs/gsg_db_rep/CXX/apioverview.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -124,20 +124,13 @@
</li>
<li>
<p>
- Requires that only one instance of the
- environment handle be used.
- </p>
- </li>
- <li>
- <p>
Upon application startup, a master can be
selected either manually or via elections.
After startup time, however, during the course of
normal operations it is possible for the
replication group to need to locate a new master (due
to network or other hardware related problems,
- for example) and in this scenario elections are
- always used to select the new master.
+ for example).
</p>
</li>
</ul>
diff --git a/docs/gsg_db_rep/CXX/autoinit.html b/docs/gsg_db_rep/CXX/autoinit.html
index 42740937..2c0f62e9 100644
--- a/docs/gsg_db_rep/CXX/autoinit.html
+++ b/docs/gsg_db_rep/CXX/autoinit.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/CXX/bulk.html b/docs/gsg_db_rep/CXX/bulk.html
index 19b0a644..29ffb4f7 100644
--- a/docs/gsg_db_rep/CXX/bulk.html
+++ b/docs/gsg_db_rep/CXX/bulk.html
@@ -13,7 +13,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/CXX/c2ctransfer.html b/docs/gsg_db_rep/CXX/c2ctransfer.html
index b6d8bf97..9a504f54 100644
--- a/docs/gsg_db_rep/CXX/c2ctransfer.html
+++ b/docs/gsg_db_rep/CXX/c2ctransfer.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/CXX/elections.html b/docs/gsg_db_rep/CXX/elections.html
index 29899a5f..14242d6f 100644
--- a/docs/gsg_db_rep/CXX/elections.html
+++ b/docs/gsg_db_rep/CXX/elections.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -102,10 +102,9 @@
</div>
</div>
<p>
- If you want to control the election process, you can declare
- a specific environment to be the master. Note that for the Replication Manager,
- it is only possible to do this at application startup.
- Should the master become unavailable during run-time for any
+ If you want to control the election process, you can
+ declare a specific environment to be the master. Should
+ the master become unavailable during run-time for any
reason, an election is held. The environment that receives
the most number of votes, wins the election and becomes the
master. A machine receives a vote because it has the most
diff --git a/docs/gsg_db_rep/CXX/electiontimes.html b/docs/gsg_db_rep/CXX/electiontimes.html
index d12a7893..b4bd731f 100644
--- a/docs/gsg_db_rep/CXX/electiontimes.html
+++ b/docs/gsg_db_rep/CXX/electiontimes.html
@@ -8,13 +8,13 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
<link rel="up" href="repapp.html" title="Chapter 3. The DB Replication Manager" />
- <link rel="prev" href="fwrkpermmessage.html" title="Permanent Message Handling" />
+ <link rel="prev" href="fwrkpermmessage.html" title="Replication Manager Permanent Message Handling" />
<link rel="next" href="fmwrkconnectretry.html" title="Managing Connection Retries" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -158,7 +158,7 @@
<td width="40%" align="right"> <a accesskey="n" href="fmwrkconnectretry.html">Next</a></td>
</tr>
<tr>
- <td width="40%" align="left" valign="top">Permanent Message Handling </td>
+ <td width="40%" align="left" valign="top">Replication Manager Permanent Message Handling </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
diff --git a/docs/gsg_db_rep/CXX/eventhandling.html b/docs/gsg_db_rep/CXX/eventhandling.html
new file mode 100644
index 00000000..66a00d56
--- /dev/null
+++ b/docs/gsg_db_rep/CXX/eventhandling.html
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Event Handling</title>
+ <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
+ <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
+ <link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
+ <link rel="up" href="introduction.html" title="Chapter 1. Introduction" />
+ <link rel="prev" href="permmessages.html" title="Permanent Message Handling" />
+ <link rel="next" href="txnapp.html" title="Chapter 2. Transactional Application" />
+ </head>
+ <body>
+ <div xmlns="" class="navheader">
+ <div class="libver">
+ <p>Library Version 12.1.6.1</p>
+ </div>
+ <table width="100%" summary="Navigation header">
+ <tr>
+ <th colspan="3" align="center">Event Handling</th>
+ </tr>
+ <tr>
+ <td width="20%" align="left"><a accesskey="p" href="permmessages.html">Prev</a> </td>
+ <th width="60%" align="center">Chapter 1. Introduction</th>
+ <td width="20%" align="right"> <a accesskey="n" href="txnapp.html">Next</a></td>
+ </tr>
+ </table>
+ <hr />
+ </div>
+ <div class="sect1" lang="en" xml:lang="en">
+ <div class="titlepage">
+ <div>
+ <div>
+ <h2 class="title" style="clear: both"><a id="eventhandling"></a>Event Handling</h2>
+ </div>
+ </div>
+ </div>
+ <p>
+ The replication system is capable of reporting a great many
+ events to which your code might need to respond. To track and
+ respond to these events, you implement a
+ <span>callback</span>
+
+ whose function it is to respond to events that happen within
+ the DB library.
+ </p>
+ <p>
+ Note that this callback is usable for events beyond those
+ required for replication purposes. In this section, however, we
+ only discuss some of the replication-specific events.
+ </p>
+ <p>
+ The callback is required to determine which event has been
+ passed to it, and then take action depending on the event.
+ </p>
+ <p>
+ Some of the more commonly handled replication events are
+ described below. For a complete list of events, see the
+
+
+ <span>
+ <code class="methodname">DbEnv::set_event_notify()</code>
+ method in the <em class="citetitle">Berkeley DB C++ API Reference Guide</em>.
+ </span>
+
+ </p>
+ <div class="itemizedlist">
+ <ul type="disc">
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_CLIENT</code>
+
+ </p>
+ <p>
+ The local environment is now a replica.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_LOCAL_SITE_REMOVED</code>
+
+ </p>
+ <p>
+ The local Replication Manager site has been removed from the group.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_MASTER</code>
+
+ </p>
+ <p>
+ The local environment is now a master.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_NEWMASTER</code>
+
+ </p>
+ <p>
+ An election was held and a new environment was made a
+ master. However, the current environment
+ <span class="emphasis"><em>is not</em></span> the master. This event exists so
+ that you can cause your code to take some unique action
+ in the event that the replication groups switches
+ masters.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_PERM_FAILED</code>
+
+ </p>
+ <p>
+ The Replication Manager did not receive enough acknowledgements to
+ ensure the transaction's durability within the
+ replicationg group. The Replication Manager has therefore flushed
+ the transaction to the master's local disk for storage.
+ </p>
+ <p>
+ How the Replication Manager knows whether the acknowledgements it has
+ received is determined by the acknowledgement policy you have set
+ for your applicaton. See
+ <a class="xref" href="fwrkpermmessage.html#fmwrkpermpolicy" title="Identifying Permanent Message Policies">Identifying Permanent Message Policies</a>
+ for more information.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_SITE_ADDED</code>
+
+ </p>
+ <p>
+ A new Replication Manager site has joined the replication group.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_SITE_REMOVED</code>
+
+ </p>
+ <p>
+ An existing Replication Manager site has been removed from the replication group.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_EVENT_REP_STARTUPDONE</code>
+
+ </p>
+ <p>
+ The replica has completed startup synchronization and
+ is now processing log records received from the master.
+ </p>
+ </li>
+ </ul>
+ </div>
+ <p>
+ For an example of how to use this callback, see
+ <a class="xref" href="fwrkmasterreplica.html#determinestate" title="Determining State">Determining State</a>
+ </p>
+ </div>
+ <div class="navfooter">
+ <hr />
+ <table width="100%" summary="Navigation footer">
+ <tr>
+ <td width="40%" align="left"><a accesskey="p" href="permmessages.html">Prev</a> </td>
+ <td width="20%" align="center">
+ <a accesskey="u" href="introduction.html">Up</a>
+ </td>
+ <td width="40%" align="right"> <a accesskey="n" href="txnapp.html">Next</a></td>
+ </tr>
+ <tr>
+ <td width="40%" align="left" valign="top">Permanent Message Handling </td>
+ <td width="20%" align="center">
+ <a accesskey="h" href="index.html">Home</a>
+ </td>
+ <td width="40%" align="right" valign="top"> Chapter 2. Transactional Application</td>
+ </tr>
+ </table>
+ </div>
+ </body>
+</html>
diff --git a/docs/gsg_db_rep/CXX/exampledoloop.html b/docs/gsg_db_rep/CXX/exampledoloop.html
index 9d630867..c766509f 100644
--- a/docs/gsg_db_rep/CXX/exampledoloop.html
+++ b/docs/gsg_db_rep/CXX/exampledoloop.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -101,7 +101,7 @@ using std::flush;
#define DATABASE "quote.db"
<strong class="userinput"><code>#define SLEEPTIME 3</code></strong>
-const char *progname = "RepMgrGSG";
+const char *progname = "excxx_repquote_gsg_repmgr";
<strong class="userinput"><code>// Struct used to store information in Db app_private field.
typedef struct {
diff --git a/docs/gsg_db_rep/CXX/fmwrkconnectretry.html b/docs/gsg_db_rep/CXX/fmwrkconnectretry.html
index 35423b45..710be7a1 100644
--- a/docs/gsg_db_rep/CXX/fmwrkconnectretry.html
+++ b/docs/gsg_db_rep/CXX/fmwrkconnectretry.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/CXX/fwrkmasterreplica.html b/docs/gsg_db_rep/CXX/fwrkmasterreplica.html
index 593fa483..1cfc2326 100644
--- a/docs/gsg_db_rep/CXX/fwrkmasterreplica.html
+++ b/docs/gsg_db_rep/CXX/fwrkmasterreplica.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -106,246 +106,30 @@
</div>
</div>
<p>
- In order to determine whether your code is
- running as a master or a replica, you implement a
- callback whose function it is to respond to
- events that happen within the DB library.
- Note that these events are raised whenever the state is established.
- For example, when the current environment becomes a client —
- including at application startup — the
- <code class="literal">DB_EVENT_REP_CLIENT</code> event is raised. Also, when an
- election is held and a replica is elected to be a master, the
- <code class="literal">DB_EVENT_REP_MASTER</code> event is raised on the newly elected master and the
- <code class="literal">DB_EVENT_REP_NEWMASTER</code> is raised on the other replicas.
- </p>
+ In order to determine whether your code is running as a
+ master or a replica, you implement an event handling
+ callback, which we initially describe in
+ <a class="xref" href="eventhandling.html" title="Event Handling">Event Handling</a>.
+ When the current environment becomes a client —
+ including at application startup — the
+ <code class="literal">DB_EVENT_REP_CLIENT</code> event is raised.
+ When an election is held and a replica is elected to be a
+ master, the <code class="literal">DB_EVENT_REP_MASTER</code> event is
+ raised on the newly elected master and the
+ <code class="literal">DB_EVENT_REP_NEWMASTER</code> is raised on the
+ other replicas.
+ </p>
<p>
- Note that this callback is usable for events beyond
- those required for replication purposes. In this
- section, however, we only discuss the
- replication-specific events.
- </p>
+ The implementation of the event handling callback is fairly
+ simple. First you pass a structure to the environment
+ handle that you can use to record the environment's state,
+ and then you implement a switch statement within the
+ callback that you use to record the current state,
+ depending on the arriving event.
+ </p>
<p>
- The callback is required to determine
- which event has been passed to it, and then take
- action depending on the event. For replication,
- the events that we care about are:
- </p>
- <p>
- Some of the more commonly handled events are
- described below. For a complete list of events, see
- the
-
-
- <span>
- <code class="methodname">DbEnv::set_event_notify()</code>
- method in the <em class="citetitle">Berkeley DB C++ API Reference Guide</em>.
- </span>
-
- </p>
- <div class="itemizedlist">
- <ul type="disc">
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_CLIENT</code>
-
- </p>
- <p>
- The local environment is now a replica.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_CONNECT_BROKEN</code>
-
- </p>
- <p>
- A previously established connection between
- two sites in the replication group has been
- broken.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_CONNECT_ESTD</code>
-
- </p>
- <p>
- A connection has been established between
- two sites in the replication group.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_CONNECT_RETRY_ESTABLISHED</code>
-
- </p>
- <p>
- An attempt was made to establish a connection
- to a known remote site, but the connection
- attempt failed.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_DUPMASTER</code>
-
- </p>
- <p>
- A duplicate master has been discovered in the
- replication group.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_ELECTED</code>
-
- </p>
- <p>
- The local site has just won an election and
- is now the master. Your code should now
- reconfigure itself to operation as a master
- site.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_ELECTION_FAILED</code>
-
- </p>
- <p>
- The local site's attempt to initiate or
- participate in a replication master election
- failed, due to the lack of timely message
- response from a sufficient number of remote
- sites.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_ELECTION_STARTED</code>
- </p>
- <p>
- Replication Manager has started an election to choose a master site.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_LOCAL_SITE_REMOVED</code>
-
- </p>
- <p>
- The local site has been removed from the group.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_NEWMASTER</code>
-
- </p>
- <p>
- An election was held and a new environment was made a
- master. However, the current environment <span class="emphasis"><em>is
- not</em></span> the master. This event exists so that
- you can cause your code to take some unique action in the
- event that the replication groups switches masters.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_MASTER</code>
-
- </p>
- <p>
- The local environment is now a master.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_MASTER_FAILURE</code>
-
- </p>
- <p>
- The connection to the remote master replication site has failed.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_PERM_FAILED</code>
-
- </p>
- <p>
- The Replication Manager did not receive enough acknowledgements to
- ensure the transaction's durability within the replicationg group.
- The Replication Manager has therefore flushed the transaction to
- the master's local disk for storage.
- </p>
- <p>
- How the Replication Manager knows whether the acknowledgements it
- has received is determined by the ack policy you have set for your
- applicaton. See <a class="xref" href="fwrkpermmessage.html#fmwrkpermpolicy" title="Identifying Permanent Message Policies">Identifying Permanent Message Policies</a>
- for more information.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_SITE_ADDED</code>
-
- </p>
- <p>
- A new site has joined the replication group.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_SITE_REMOVED</code>
-
- </p>
- <p>
- An existing site has been removed from the replication group.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_REP_STARTUPDONE</code>
-
- </p>
- <p>
- The replica has completed startup
- synchronization and is now processing
- log records received from the master.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_EVENT_WRITE_FAILED</code>
-
- </p>
- <p>
- A Berkeley DB write to stable storage failed.
- </p>
- </li>
- </ul>
- </div>
- <p>
- Note that these events are raised whenever the
- state is established. That is, when the current
- environment becomes a replica, and that includes
- at application startup, the event is raised.
- Also, when an election is held and a replica is elected to be a
- master, then the event occurs.
- </p>
- <p>
- The implementation of this callback is fairly
- simple. First you pass a structure to the
- environment handle that you can use to record the
- environment's state, and then you implement a switch
- statement within the callback that you use to
- record the current state, depending on the
- arriving event.
- </p>
- <p>
- For example:
- </p>
+ For example:
+ </p>
<pre class="programlisting">#include &lt;db_cxx.h&gt;
/* Forward declaration */
void *event_callback(DbEnv *, u_int32_t, void *);
@@ -379,9 +163,9 @@ dbenv-&gt;set_app_private(&amp;my_app_data);
*/
dbenv-&gt;set_event_notify(event_callback); </pre>
<p>
- That done, we still need to implement the callback itself. This
- implementation can be fairly trivial.
-</p>
+ That done, we still need to implement the callback itself. This
+ implementation can be fairly trivial.
+ </p>
<pre class="programlisting">/*
* A callback used to determine whether the local environment is a
* replica or a master. This is called by the Replication Manager
@@ -413,19 +197,19 @@ event_callback(DbEnv *dbenv, u_int32_t which, void *info)
}
} </pre>
<p>
- Notice how we access the
- <code class="literal">APP_DATA</code> information using the environment
- handle's <code class="literal">app_private</code> data member. We also ignore
- the <code class="literal">DB_EVENT_REP_NEWMASTER</code> and
- <code class="literal">DB_EVENT_REP_STARTUPDONE</code> cases since these are not
- relevant for simple replicated applications.
-</p>
+ Notice how we access the <code class="literal">APP_DATA</code>
+ information using the environment handle's
+ <code class="literal">app_private</code> data member. We also ignore the
+ <code class="literal">DB_EVENT_REP_NEWMASTER</code> and
+ <code class="literal">DB_EVENT_REP_STARTUPDONE</code> cases since these
+ are not relevant for simple replicated applications.
+ </p>
<p>
- Of course, this only gives us the current state of the environment. We
- still need the code that determines what to do when the environment
- changes state and how to behave depending on the state (described
- in the next section).
-</p>
+ Of course, this only gives us the current state of the
+ environment. We still need the code that determines what to do
+ when the environment changes state and how to behave depending
+ on the state (described in the next section).
+ </p>
</div>
</div>
<div class="navfooter">
diff --git a/docs/gsg_db_rep/CXX/fwrkpermmessage.html b/docs/gsg_db_rep/CXX/fwrkpermmessage.html
index 07f6fd22..734c8d65 100644
--- a/docs/gsg_db_rep/CXX/fwrkpermmessage.html
+++ b/docs/gsg_db_rep/CXX/fwrkpermmessage.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>Permanent Message Handling</title>
+ <title>Replication Manager Permanent Message Handling</title>
<link rel="stylesheet" href="gettingStarted.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
@@ -14,11 +14,11 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
- <th colspan="3" align="center">Permanent Message Handling</th>
+ <th colspan="3" align="center">Replication Manager Permanent Message Handling</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="repmgr_init_example_c.html">Prev</a> </td>
@@ -32,7 +32,7 @@
<div class="titlepage">
<div>
<div>
- <h2 class="title" style="clear: both"><a id="fwrkpermmessage"></a>Permanent Message Handling</h2>
+ <h2 class="title" style="clear: both"><a id="fwrkpermmessage"></a>Replication Manager Permanent Message Handling</h2>
</div>
</div>
</div>
@@ -136,41 +136,6 @@
<ul type="disc">
<li>
<p>
- <code class="literal">DB_REPMGR_ACKS_NONE</code>
-
- </p>
- <p>
- No permanent message acknowledgments are required. If
- this policy is selected, permanent message handling is
- essentially "turned off." That is, the master will
- never wait for replica acknowledgments. In this case,
- transaction log data is either flushed or not strictly
- depending on the type of commit that is being performed
- (synchronous or asynchronous).
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_REPMGR_ACKS_ONE</code>
-
- </p>
- <p>
- At least one replica must acknowledge the permanent
- message within the timeout period.
- </p>
- </li>
- <li>
- <p>
- <code class="literal">DB_REPMGR_ACKS_ONE_PEER</code>
-
- </p>
- <p>
- At least one electable peer must acknowledge the permanent
- message within the timeout period.
- </p>
- </li>
- <li>
- <p>
<code class="literal">DB_REPMGR_ACKS_ALL</code>
</p>
@@ -210,6 +175,41 @@
</li>
<li>
<p>
+ <code class="literal">DB_REPMGR_ACKS_NONE</code>
+
+ </p>
+ <p>
+ No permanent message acknowledgments are required. If
+ this policy is selected, permanent message handling is
+ essentially "turned off." That is, the master will
+ never wait for replica acknowledgments. In this case,
+ transaction log data is either flushed or not strictly
+ depending on the type of commit that is being performed
+ (synchronous or asynchronous).
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_REPMGR_ACKS_ONE</code>
+
+ </p>
+ <p>
+ At least one replica must acknowledge the permanent
+ message within the timeout period.
+ </p>
+ </li>
+ <li>
+ <p>
+ <code class="literal">DB_REPMGR_ACKS_ONE_PEER</code>
+
+ </p>
+ <p>
+ At least one electable peer must acknowledge the permanent
+ message within the timeout period.
+ </p>
+ </li>
+ <li>
+ <p>
<code class="literal">DB_REPMGR_ACKS_QUORUM</code>
</p>
@@ -337,7 +337,7 @@
<strong class="userinput"><code>/* Permanent messages require at least one ack */
dbenv.repmgr_set_ack_policy(DB_REPMGR_ACKS_ONE);
/* Give 500 microseconds to receive the ack */
- dbenv.rep_set_timeout(DB_REP_ACK_TIMEOUT, 500);</code></strong>
+ dbenv.rep_set_timeout(DB_REP_ACK_TIMEOUT, 5);</code></strong>
dbenv.set_cachesize(0, CACHESIZE, 0);
dbenv.set_flags(DB_TXN_NOSYNC, 1);
diff --git a/docs/gsg_db_rep/CXX/heartbeats.html b/docs/gsg_db_rep/CXX/heartbeats.html
index 10dec0ca..23bdd8a0 100644
--- a/docs/gsg_db_rep/CXX/heartbeats.html
+++ b/docs/gsg_db_rep/CXX/heartbeats.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -60,9 +60,10 @@
<code class="methodname">DbEnv::rep_set_timeout()</code>
method.
</span>
-
- You must also provide the method a value representing the period between heartbeats in microseconds. Note that the heartbeat is sent only if the
- system is idle.
+
+ You must also provide the method a value representing the
+ period between heartbeats in microseconds. Note that the
+ heartbeat is sent only if the system is idle.
</p>
<p>
On the replica, you configure the application to listen
diff --git a/docs/gsg_db_rep/CXX/index.html b/docs/gsg_db_rep/CXX/index.html
index b6f10222..29c222c0 100644
--- a/docs/gsg_db_rep/CXX/index.html
+++ b/docs/gsg_db_rep/CXX/index.html
@@ -12,7 +12,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -30,11 +30,11 @@
<div class="titlepage">
<div>
<div>
- <h1 class="title"><a id="idm235136"></a>Getting Started with Replicated Berkeley DB Applications</h1>
+ <h1 class="title"><a id="idm190616"></a>Getting Started with Replicated Berkeley DB Applications</h1>
</div>
<div>
<div class="legalnotice">
- <a id="idm387168"></a>
+ <a id="idp273608"></a>
<p class="legalnotice-title">
<b>Legal Notice</b>
</p>
@@ -64,7 +64,7 @@
<p>
To obtain a copy of this document's original source code, please
submit a request to the Oracle Technology Network forum at:
- <a class="ulink" href="http://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=271</a>
+ <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=271</a>
</p>
@@ -72,7 +72,7 @@
</div>
</div>
<div>
- <p class="pubdate">5/11/2012</p>
+ <p class="pubdate">2/17/2015</p>
</div>
</div>
<hr />
@@ -220,6 +220,11 @@
</dt>
</dl>
</dd>
+ <dt>
+ <span class="sect1">
+ <a href="eventhandling.html">Event Handling</a>
+ </span>
+ </dt>
</dl>
</dd>
<dt>
@@ -331,7 +336,7 @@
</dt>
<dt>
<span class="sect1">
- <a href="fwrkpermmessage.html">Permanent Message Handling</a>
+ <a href="fwrkpermmessage.html">Replication Manager Permanent Message Handling</a>
</span>
</dt>
<dd>
diff --git a/docs/gsg_db_rep/CXX/introduction.html b/docs/gsg_db_rep/CXX/introduction.html
index ad0d0207..e68d5bdb 100644
--- a/docs/gsg_db_rep/CXX/introduction.html
+++ b/docs/gsg_db_rep/CXX/introduction.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -144,6 +144,11 @@
</dt>
</dl>
</dd>
+ <dt>
+ <span class="sect1">
+ <a href="eventhandling.html">Event Handling</a>
+ </span>
+ </dt>
</dl>
</div>
<p>
@@ -302,7 +307,7 @@
must reside either in the <code class="literal">ENV_HOME</code>
directory, or in the directory identified by the
- <code class="methodname">DbEnv::set_data_dir()</code>
+ <code class="methodname">DbEnv::add_data_dir()</code>
method. Unlike non-replication applications, you cannot place your
databases in a subdirectory below these locations. You should
diff --git a/docs/gsg_db_rep/CXX/manageblock.html b/docs/gsg_db_rep/CXX/manageblock.html
index 6c24acce..1cdcb230 100644
--- a/docs/gsg_db_rep/CXX/manageblock.html
+++ b/docs/gsg_db_rep/CXX/manageblock.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/CXX/moreinfo.html b/docs/gsg_db_rep/CXX/moreinfo.html
index f21a1515..3a10cbb5 100644
--- a/docs/gsg_db_rep/CXX/moreinfo.html
+++ b/docs/gsg_db_rep/CXX/moreinfo.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -55,7 +55,7 @@
<li>
<p>
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/gsg_txn/CXX/index.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/gsg_txn/CXX/index.html" target="_top">
Getting Started with Transaction Processing for C++
</a>
@@ -68,7 +68,7 @@
<li>
<p>
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/gsg/CXX/index.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/gsg/CXX/index.html" target="_top">
Getting Started with Berkeley DB for C++
</a>
@@ -81,7 +81,7 @@
</li>
<li>
<p>
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/programmer_reference/index.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/programmer_reference/index.html" target="_top">
Berkeley DB Programmer's Reference Guide
</a>
</p>
@@ -90,7 +90,7 @@
<p>
<span>
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/api_reference/CXX/frame_main.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/api_reference/CXX/frame_main.html" target="_top">
Berkeley DB C++ API Reference Guide
</a>
</span>
@@ -117,7 +117,7 @@
downloads, visit
- <a class="ulink" href="http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html" target="_top">http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html</a>.
+ <a class="ulink" href="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html" target="_top">http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html</a>.
</p>
</span>
<div class="sect2" lang="en" xml:lang="en">
@@ -132,8 +132,8 @@
You can post your comments and questions at the Oracle
Technology (OTN) forum for
<span>
- Oracle Berkeley DB at: <a class="ulink" href="http://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=271</a>,
- or for Oracle Berkeley DB High Availability at: <a class="ulink" href="http://forums.oracle.com/forums/forum.jspa?forumID=272" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=272</a>.
+ Oracle Berkeley DB at: <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=271</a>,
+ or for Oracle Berkeley DB High Availability at: <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=272" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=272</a>.
</span>
diff --git a/docs/gsg_db_rep/CXX/permmessages.html b/docs/gsg_db_rep/CXX/permmessages.html
index da0b8957..1e19e2cc 100644
--- a/docs/gsg_db_rep/CXX/permmessages.html
+++ b/docs/gsg_db_rep/CXX/permmessages.html
@@ -9,12 +9,12 @@
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
<link rel="up" href="introduction.html" title="Chapter 1. Introduction" />
<link rel="prev" href="elections.html" title="Holding Elections" />
- <link rel="next" href="txnapp.html" title="Chapter 2. Transactional Application" />
+ <link rel="next" href="eventhandling.html" title="Event Handling" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -23,7 +23,7 @@
<tr>
<td width="20%" align="left"><a accesskey="p" href="elections.html">Prev</a> </td>
<th width="60%" align="center">Chapter 1. Introduction</th>
- <td width="20%" align="right"> <a accesskey="n" href="txnapp.html">Next</a></td>
+ <td width="20%" align="right"> <a accesskey="n" href="eventhandling.html">Next</a></td>
</tr>
</table>
<hr />
@@ -90,29 +90,29 @@
message acknowledgment.
</p>
<p>
- For the master (again, using the Replication Manager), things are a little more complicated than
- simple message acknowledgment. Usually in a replicated
- application, the master commits transactions
- asynchronously; that is, the commit operation does not
- block waiting for log data to be flushed to disk before
- returning. So when a master is managing permanent
+ For the master (again, using the Replication Manager), things are a
+ little more complicated than simple message acknowledgment.
+ Usually in a replicated application, the master commits
+ transactions asynchronously; that is, the commit operation
+ does not block waiting for log data to be flushed to disk
+ before returning. So when a master is managing permanent
messages, it typically blocks the committing thread
immediately before <code class="methodname">commit()</code>
- returns. The thread then waits for acknowledgments from
- its replicas. If it receives enough acknowledgments, it
+ returns. The thread then waits for acknowledgments from its
+ replicas. If it receives enough acknowledgments, it
continues to operate as normal.
</p>
<p>
- If the master does not
- receive message acknowledgments — or, more likely, it does not receive
+ If the master does not receive message acknowledgments
+ — or, more likely, it does not receive
<span class="emphasis"><em>enough</em></span> acknowledgments — the
committing thread flushes its log data to disk and then
continues operations as normal. The master application can
do this because replicas that fail to handle a message, for
whatever reason, will eventually catch up to the master. So
by flushing the transaction logs to disk, the master is
- ensuring that the data modifications have made it to
- stable storage in one location (its own hard drive).
+ ensuring that the data modifications have made it to stable
+ storage in one location (its own hard drive).
</p>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
@@ -195,7 +195,7 @@
replicas.
</p>
<p>
- That said, it is important to remember that
+ That said, remember that
managing permanent messages involves a fair amount
of network traffic. The messages must be sent to
the replicas and the replicas must acknowledge
@@ -268,85 +268,16 @@
depends on which API you are using to implement
replication. If you are using the Replication Manager, then
permanent message handling is configured using
- policies that you specify to the framework. In
- this case, you can configure your application
- to:
- </p>
- <div class="itemizedlist">
- <ul type="disc">
- <li>
- <p>
- Ignore permanent messages (the master
- does not wait for acknowledgments).
- </p>
- </li>
- <li>
- <p>
- Require acknowledgments from a
- quorum. A quorum is reached when
- acknowledgments are received from the
- minimum number of electable
- peers needed to ensure that
- the record remains durable if
- an election is held.
- </p>
- <p>
- An <span class="emphasis"><em>electable peer</em></span> is any other
- site that potentially can be elected master.
- </p>
- <p>
- The goal here is to be
- absolutely sure the record is
- durable. The master wants to
- hear from enough electable
- peer that they have
- committed the record so that if
- an election is held, the master
- knows the record will exist even
- if a new master is selected.
- </p>
- <p>
- This is the default policy.
- </p>
- </li>
- <li>
- <p>
- Require an acknowledgment from at least one replica.
- </p>
- </li>
- <li>
- <p>
- Require acknowledgments from
- all replicas.
- </p>
- </li>
- <li>
- <p>
- Require an acknowledgment from at least one electable peer.
- </p>
- </li>
- <li>
- <p>
- Require acknowledgments from all electable peers.
- </p>
- </li>
- </ul>
- </div>
- <p>
- Note that the Replication Manager simply flushes its transaction
- logs and moves on if a permanent message is not
- sufficiently acknowledged.
- </p>
- <p>
- For details on permanent message handling with the
- Replication Manager, see <a class="xref" href="fwrkpermmessage.html" title="Permanent Message Handling">Permanent Message Handling</a>.
+ policies that you specify to the framework.
+ For a list of these policies, see
+ <a class="xref" href="fwrkpermmessage.html" title="Replication Manager Permanent Message Handling">Replication Manager Permanent Message Handling</a>.
</p>
<p>
If these policies are not sufficient for your
needs, or if you want your application to take more
corrective action than simply flushing log buffers
in the event of an unsuccessful commit, then you
- must use implement replication using the Base APIs.
+ must implement replication using the Base APIs.
</p>
<p>
When using the Base APIs, messages are
@@ -395,14 +326,14 @@
<td width="20%" align="center">
<a accesskey="u" href="introduction.html">Up</a>
</td>
- <td width="40%" align="right"> <a accesskey="n" href="txnapp.html">Next</a></td>
+ <td width="40%" align="right"> <a accesskey="n" href="eventhandling.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Holding Elections </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
- <td width="40%" align="right" valign="top"> Chapter 2. Transactional Application</td>
+ <td width="40%" align="right" valign="top"> Event Handling</td>
</tr>
</table>
</div>
diff --git a/docs/gsg_db_rep/CXX/preface.html b/docs/gsg_db_rep/CXX/preface.html
index ad8da1b9..acc6c93c 100644
--- a/docs/gsg_db_rep/CXX/preface.html
+++ b/docs/gsg_db_rep/CXX/preface.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -64,7 +64,7 @@
</div>
<p>
This document describes how to write replicated applications for
- Berkeley DB 11<span class="emphasis"><em>g</em></span> Release 2 (library version 11.2.5.3). The APIs used to
+ Berkeley DB 12<span class="emphasis"><em>c</em></span> Release 1 (library version 12.1.6.1). The APIs used to
implement replication in your application are described here. This
book describes the concepts surrounding replication, the scenarios
under which you might choose to use it, and the architectural
diff --git a/docs/gsg_db_rep/CXX/processingloop.html b/docs/gsg_db_rep/CXX/processingloop.html
index a9a20e82..5e8c388c 100644
--- a/docs/gsg_db_rep/CXX/processingloop.html
+++ b/docs/gsg_db_rep/CXX/processingloop.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/CXX/rep_init_code.html b/docs/gsg_db_rep/CXX/rep_init_code.html
index e91855f8..c69c11e8 100644
--- a/docs/gsg_db_rep/CXX/rep_init_code.html
+++ b/docs/gsg_db_rep/CXX/rep_init_code.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -123,7 +123,7 @@
* First: Create a DB_SITE handle to identify the site's
* host/port network address.
*/
- dbenv-&gt;repmgr_site(listen_host, listen_port, &amp;dbsite;, 0);
+ dbenv-&gt;repmgr_site(listen_host, listen_port, &amp;dbsite, 0);
/*
* Second: Configure this site as the local site within the
diff --git a/docs/gsg_db_rep/CXX/repadvantage.html b/docs/gsg_db_rep/CXX/repadvantage.html
index 1e4942a6..0eb7f762 100644
--- a/docs/gsg_db_rep/CXX/repadvantage.html
+++ b/docs/gsg_db_rep/CXX/repadvantage.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -153,7 +153,7 @@
your replication group.
</p>
<p>
- For more information, see <a class="xref" href="fwrkpermmessage.html" title="Permanent Message Handling">Permanent Message Handling</a>.
+ For more information, see <a class="xref" href="fwrkpermmessage.html" title="Replication Manager Permanent Message Handling">Replication Manager Permanent Message Handling</a>.
</p>
</li>
</ul>
diff --git a/docs/gsg_db_rep/CXX/repapp.html b/docs/gsg_db_rep/CXX/repapp.html
index f2142763..e66e2262 100644
--- a/docs/gsg_db_rep/CXX/repapp.html
+++ b/docs/gsg_db_rep/CXX/repapp.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -78,7 +78,7 @@
</dt>
<dt>
<span class="sect1">
- <a href="fwrkpermmessage.html">Permanent Message Handling</a>
+ <a href="fwrkpermmessage.html">Replication Manager Permanent Message Handling</a>
</span>
</dt>
<dd>
@@ -175,10 +175,8 @@
environment's priority, setting the TCP/IP address that
this replication environment will use for incoming
replication messages, identifying TCP/IP addresses of other
- replication environments, setting the number of replication
- environments in the replication group, and so forth. These
- actions are discussed throughout the remainder of this
- chapter.
+ replication environments, and so forth. These actions are
+ discussed throughout the remainder of this chapter.
</p>
</li>
<li>
@@ -220,13 +218,6 @@
</li>
</ol>
</div>
- <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
- <h3 class="title">Note</h3>
- <p>
- The Replication Manager allows you to only use one environment handle per
- process.
- </p>
- </div>
<p>
When you are ready to shut down your application:
</p>
diff --git a/docs/gsg_db_rep/CXX/repmgr_init_example_c.html b/docs/gsg_db_rep/CXX/repmgr_init_example_c.html
index 0a349946..4ecbd445 100644
--- a/docs/gsg_db_rep/CXX/repmgr_init_example_c.html
+++ b/docs/gsg_db_rep/CXX/repmgr_init_example_c.html
@@ -9,12 +9,12 @@
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
<link rel="up" href="repapp.html" title="Chapter 3. The DB Replication Manager" />
<link rel="prev" href="rep_init_code.html" title="Starting and Stopping Replication" />
- <link rel="next" href="fwrkpermmessage.html" title="Permanent Message Handling" />
+ <link rel="next" href="fwrkpermmessage.html" title="Replication Manager Permanent Message Handling" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -190,7 +190,7 @@ public:
REP_HOST_INFO *CurItem = other_hosts;
while (CurItem-&gt;next != NULL)
{
- REP_HOST_INFO *TmpItem = CurItem;
+ REP_HOST_INFO *TmpItem = CurItem-&gt;next;
free(CurItem);
CurItem = TmpItem;
}
@@ -285,7 +285,7 @@ static void usage()
&lt;&lt; "-h home<strong class="userinput"><code>-l|L host:port [-r host:port]</code></strong>"
<strong class="userinput"><code>&lt;&lt; "[-p priority]" &lt;&lt; endl;</code></strong>
- cerr &lt;&lt; "\t -h home directory" &lt;&lt; endl
+ cerr &lt;&lt; "\t -h home directory (required)" &lt;&lt; endl
<strong class="userinput"><code>&lt;&lt; "\t -l host:port (required unless -L is specified;"
&lt;&lt; "\t l stands for local)" &lt;&lt; endl
&lt;&lt; "\t -L host:port (optional, L means group "
@@ -505,7 +505,7 @@ err:
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
- <td width="40%" align="right" valign="top"> Permanent Message Handling</td>
+ <td width="40%" align="right" valign="top"> Replication Manager Permanent Message Handling</td>
</tr>
</table>
</div>
diff --git a/docs/gsg_db_rep/CXX/rywc.html b/docs/gsg_db_rep/CXX/rywc.html
index a20382b6..44bacdfd 100644
--- a/docs/gsg_db_rep/CXX/rywc.html
+++ b/docs/gsg_db_rep/CXX/rywc.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/CXX/simpleprogramlisting.html b/docs/gsg_db_rep/CXX/simpleprogramlisting.html
index 894c68d4..de8d1041 100644
--- a/docs/gsg_db_rep/CXX/simpleprogramlisting.html
+++ b/docs/gsg_db_rep/CXX/simpleprogramlisting.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/CXX/txnapp.html b/docs/gsg_db_rep/CXX/txnapp.html
index 8990cb83..3d6bd57d 100644
--- a/docs/gsg_db_rep/CXX/txnapp.html
+++ b/docs/gsg_db_rep/CXX/txnapp.html
@@ -8,20 +8,20 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
<link rel="up" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
- <link rel="prev" href="permmessages.html" title="Permanent Message Handling" />
+ <link rel="prev" href="eventhandling.html" title="Event Handling" />
<link rel="next" href="simpleprogramlisting.html" title="Program Listing" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Chapter 2. Transactional Application</th>
</tr>
<tr>
- <td width="20%" align="left"><a accesskey="p" href="permmessages.html">Prev</a> </td>
+ <td width="20%" align="left"><a accesskey="p" href="eventhandling.html">Prev</a> </td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="simpleprogramlisting.html">Next</a></td>
</tr>
@@ -169,12 +169,12 @@ QUOTESERVER&gt; quit
<hr />
<table width="100%" summary="Navigation footer">
<tr>
- <td width="40%" align="left"><a accesskey="p" href="permmessages.html">Prev</a> </td>
+ <td width="40%" align="left"><a accesskey="p" href="eventhandling.html">Prev</a> </td>
<td width="20%" align="center"> </td>
<td width="40%" align="right"> <a accesskey="n" href="simpleprogramlisting.html">Next</a></td>
</tr>
<tr>
- <td width="40%" align="left" valign="top">Permanent Message Handling </td>
+ <td width="40%" align="left" valign="top">Event Handling </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
diff --git a/docs/gsg_db_rep/JAVA/Replication-JAVA-GSG.pdf b/docs/gsg_db_rep/JAVA/Replication-JAVA-GSG.pdf
index 306a6567..7862f3d5 100644
--- a/docs/gsg_db_rep/JAVA/Replication-JAVA-GSG.pdf
+++ b/docs/gsg_db_rep/JAVA/Replication-JAVA-GSG.pdf
Binary files differ
diff --git a/docs/gsg_db_rep/JAVA/addfeatures.html b/docs/gsg_db_rep/JAVA/addfeatures.html
index f683bf0f..5a51864b 100644
--- a/docs/gsg_db_rep/JAVA/addfeatures.html
+++ b/docs/gsg_db_rep/JAVA/addfeatures.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/JAVA/apioverview.html b/docs/gsg_db_rep/JAVA/apioverview.html
index b975d871..01bdf6ed 100644
--- a/docs/gsg_db_rep/JAVA/apioverview.html
+++ b/docs/gsg_db_rep/JAVA/apioverview.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -126,20 +126,13 @@
</li>
<li>
<p>
- Requires that only one instance of the
- environment handle be used.
- </p>
- </li>
- <li>
- <p>
Upon application startup, a master can be
selected either manually or via elections.
After startup time, however, during the course of
normal operations it is possible for the
replication group to need to locate a new master (due
to network or other hardware related problems,
- for example) and in this scenario elections are
- always used to select the new master.
+ for example).
</p>
</li>
</ul>
diff --git a/docs/gsg_db_rep/JAVA/autoinit.html b/docs/gsg_db_rep/JAVA/autoinit.html
index a49e8681..24aad119 100644
--- a/docs/gsg_db_rep/JAVA/autoinit.html
+++ b/docs/gsg_db_rep/JAVA/autoinit.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/JAVA/bulk.html b/docs/gsg_db_rep/JAVA/bulk.html
index 97ed021f..9364a2fa 100644
--- a/docs/gsg_db_rep/JAVA/bulk.html
+++ b/docs/gsg_db_rep/JAVA/bulk.html
@@ -13,7 +13,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/JAVA/c2ctransfer.html b/docs/gsg_db_rep/JAVA/c2ctransfer.html
index bc61eefb..5c786e51 100644
--- a/docs/gsg_db_rep/JAVA/c2ctransfer.html
+++ b/docs/gsg_db_rep/JAVA/c2ctransfer.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/JAVA/elections.html b/docs/gsg_db_rep/JAVA/elections.html
index 3b5f31ee..29d18ba5 100644
--- a/docs/gsg_db_rep/JAVA/elections.html
+++ b/docs/gsg_db_rep/JAVA/elections.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -100,10 +100,9 @@
</div>
</div>
<p>
- If you want to control the election process, you can declare
- a specific environment to be the master. Note that for the Replication Manager,
- it is only possible to do this at application startup.
- Should the master become unavailable during run-time for any
+ If you want to control the election process, you can
+ declare a specific environment to be the master. Should
+ the master become unavailable during run-time for any
reason, an election is held. The environment that receives
the most number of votes, wins the election and becomes the
master. A machine receives a vote because it has the most
diff --git a/docs/gsg_db_rep/JAVA/electiontimes.html b/docs/gsg_db_rep/JAVA/electiontimes.html
index 7f77201e..e91be57a 100644
--- a/docs/gsg_db_rep/JAVA/electiontimes.html
+++ b/docs/gsg_db_rep/JAVA/electiontimes.html
@@ -8,13 +8,13 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
<link rel="up" href="repapp.html" title="Chapter 3. The DB Replication Manager" />
- <link rel="prev" href="fwrkpermmessage.html" title="Permanent Message Handling" />
+ <link rel="prev" href="fwrkpermmessage.html" title="Replication Manager Permanent Message Handling" />
<link rel="next" href="fmwrkconnectretry.html" title="Managing Connection Retries" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -152,7 +152,7 @@
<td width="40%" align="right"> <a accesskey="n" href="fmwrkconnectretry.html">Next</a></td>
</tr>
<tr>
- <td width="40%" align="left" valign="top">Permanent Message Handling </td>
+ <td width="40%" align="left" valign="top">Replication Manager Permanent Message Handling </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
diff --git a/docs/gsg_db_rep/JAVA/eventhandling.html b/docs/gsg_db_rep/JAVA/eventhandling.html
new file mode 100644
index 00000000..58601b48
--- /dev/null
+++ b/docs/gsg_db_rep/JAVA/eventhandling.html
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>Event Handling</title>
+ <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
+ <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
+ <link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
+ <link rel="up" href="introduction.html" title="Chapter 1. Introduction" />
+ <link rel="prev" href="permmessages.html" title="Permanent Message Handling" />
+ <link rel="next" href="txnapp.html" title="Chapter 2. Transactional Application" />
+ </head>
+ <body>
+ <div xmlns="" class="navheader">
+ <div class="libver">
+ <p>Library Version 12.1.6.1</p>
+ </div>
+ <table width="100%" summary="Navigation header">
+ <tr>
+ <th colspan="3" align="center">Event Handling</th>
+ </tr>
+ <tr>
+ <td width="20%" align="left"><a accesskey="p" href="permmessages.html">Prev</a> </td>
+ <th width="60%" align="center">Chapter 1. Introduction</th>
+ <td width="20%" align="right"> <a accesskey="n" href="txnapp.html">Next</a></td>
+ </tr>
+ </table>
+ <hr />
+ </div>
+ <div class="sect1" lang="en" xml:lang="en">
+ <div class="titlepage">
+ <div>
+ <div>
+ <h2 class="title" style="clear: both"><a id="eventhandling"></a>Event Handling</h2>
+ </div>
+ </div>
+ </div>
+ <p>
+ The replication system is capable of reporting a great many
+ events to which your code might need to respond. To track and
+ respond to these events, you implement a
+
+ <span>class</span>
+ whose function it is to respond to events that happen within
+ the DB library.
+ </p>
+ <p>
+ In order to respond to events, you must write your application as an
+ implementation of
+ <code class="classname">com.sleepycat.db.EventHandler</code>.
+ This class gives you a series of methods within which you can
+ detect and respond to various events that occur in your DB
+ code. Note that some of these are necessary for events beyond
+ those required for replication. In this section, however, we
+ only discuss some of the replication-specific events.
+ </p>
+ <p>
+ Some of the more commonly handled replication events are
+ described below. For a complete list of events, see the
+
+
+
+ <span>
+ <code class="classname">com.sleepycat.db.EventHandler</code>
+ javadoc page.
+ </span>
+ </p>
+ <div class="itemizedlist">
+ <ul type="disc">
+ <li>
+ <p>
+
+ <code class="methodname">EventHandler.handleRepClientEvent()</code>
+ </p>
+ <p>
+ The local environment is now a replica.
+ </p>
+ </li>
+ <li>
+ <p>
+
+ <code class="methodname">EventHandler.handleRepLocalSiteRemovedEvent()</code>
+ </p>
+ <p>
+ The local Replication Manager site has been removed from the group.
+ </p>
+ </li>
+ <li>
+ <p>
+
+ <code class="methodname">EventHandler.handleRepMasterEvent()</code>
+ </p>
+ <p>
+ The local environment is now a master.
+ </p>
+ </li>
+ <li>
+ <p>
+
+ <code class="methodname">EventHandler.handleRepNewMasterEvent()</code>
+ </p>
+ <p>
+ An election was held and a new environment was made a
+ master. However, the current environment
+ <span class="emphasis"><em>is not</em></span> the master. This event exists so
+ that you can cause your code to take some unique action
+ in the event that the replication groups switches
+ masters.
+ </p>
+ </li>
+ <li>
+ <p>
+
+ <code class="methodname">EventHandler.handleRepPermFailedEvent()</code>
+ </p>
+ <p>
+ The Replication Manager did not receive enough acknowledgements to
+ ensure the transaction's durability within the
+ replicationg group. The Replication Manager has therefore flushed
+ the transaction to the master's local disk for storage.
+ </p>
+ <p>
+ How the Replication Manager knows whether the acknowledgements it has
+ received is determined by the acknowledgement policy you have set
+ for your applicaton. See
+ <a class="xref" href="fwrkpermmessage.html#fmwrkpermpolicy" title="Identifying Permanent Message Policies">Identifying Permanent Message Policies</a>
+ for more information.
+ </p>
+ </li>
+ <li>
+ <p>
+
+ <code class="methodname">EventHandler.handleRepSiteAddedEvent()</code>
+ </p>
+ <p>
+ A new Replication Manager site has joined the replication group.
+ </p>
+ </li>
+ <li>
+ <p>
+
+ <code class="methodname">EventHandler.handleRepSiteRemovedEvent()</code>
+ </p>
+ <p>
+ An existing Replication Manager site has been removed from the replication group.
+ </p>
+ </li>
+ <li>
+ <p>
+
+ <code class="methodname">EventHandler.handleRepStartupDoneEvent()</code>
+ </p>
+ <p>
+ The replica has completed startup synchronization and
+ is now processing log records received from the master.
+ </p>
+ </li>
+ </ul>
+ </div>
+ <p>
+ For an example of how to use this callback, see
+ <a class="xref" href="fwrkmasterreplica.html#determinestate" title="Determining State">Determining State</a>
+ </p>
+ </div>
+ <div class="navfooter">
+ <hr />
+ <table width="100%" summary="Navigation footer">
+ <tr>
+ <td width="40%" align="left"><a accesskey="p" href="permmessages.html">Prev</a> </td>
+ <td width="20%" align="center">
+ <a accesskey="u" href="introduction.html">Up</a>
+ </td>
+ <td width="40%" align="right"> <a accesskey="n" href="txnapp.html">Next</a></td>
+ </tr>
+ <tr>
+ <td width="40%" align="left" valign="top">Permanent Message Handling </td>
+ <td width="20%" align="center">
+ <a accesskey="h" href="index.html">Home</a>
+ </td>
+ <td width="40%" align="right" valign="top"> Chapter 2. Transactional Application</td>
+ </tr>
+ </table>
+ </div>
+ </body>
+</html>
diff --git a/docs/gsg_db_rep/JAVA/exampledoloop.html b/docs/gsg_db_rep/JAVA/exampledoloop.html
index a391df93..66352b8b 100644
--- a/docs/gsg_db_rep/JAVA/exampledoloop.html
+++ b/docs/gsg_db_rep/JAVA/exampledoloop.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/JAVA/fmwrkconnectretry.html b/docs/gsg_db_rep/JAVA/fmwrkconnectretry.html
index e646d8dc..903848dd 100644
--- a/docs/gsg_db_rep/JAVA/fmwrkconnectretry.html
+++ b/docs/gsg_db_rep/JAVA/fmwrkconnectretry.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/JAVA/fwrkmasterreplica.html b/docs/gsg_db_rep/JAVA/fwrkmasterreplica.html
index c2502c58..b2fe432e 100644
--- a/docs/gsg_db_rep/JAVA/fwrkmasterreplica.html
+++ b/docs/gsg_db_rep/JAVA/fwrkmasterreplica.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -106,241 +106,28 @@
</div>
</div>
<p>
- In order to determine whether your code is running
- as a master or a replica, you must write your
- application as an implementation of
- <code class="classname">com.sleepycat.db.EventHandler</code>.
- This class gives you a series of methods within
- which you can detect and respond to various events
- that occur in your DB code. Some, but not all,
- of these methods have to do with elections:
- </p>
+ In order to determine whether your code is running as a
+ master or a replica, you implement an event handling
+ callback, which we initially describe in
+ <a class="xref" href="eventhandling.html" title="Event Handling">Event Handling</a>.
+ When the current environment becomes a client —
+ including at application startup — the
+ <code class="literal">DB_EVENT_REP_CLIENT</code> event is raised.
+ When an election is held and a replica is elected to be a
+ master, the <code class="literal">DB_EVENT_REP_MASTER</code> event is
+ raised on the newly elected master and the
+ <code class="literal">DB_EVENT_REP_NEWMASTER</code> is raised on the
+ other replicas.
+ </p>
<p>
- Some of the more commonly handled events are
- described below. For a complete list of events, see
- the
-
-
-
- <span>
- <code class="classname">com.sleepycat.db.EventHandler</code>
- javadoc page.
- </span>
- </p>
- <div class="itemizedlist">
- <ul type="disc">
- <li>
- <p>
- <code class="methodname">EventHandler.handlePanicEvent()</code>
- </p>
- <p>
- An error has occured in the Berkeley DB library requiring your
- application to shut down and then run recovery.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepClientEvent()</code>
- </p>
- <p>
- The local environment is now a replica.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepConnectBrokenEvent()</code>
- </p>
- <p>
- A previously established connection between
- two sites in the replication group has been
- broken.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepConnectEstablishedEvent()</code>
- </p>
- <p>
- A connection has been established between
- two sites in the replication group.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepConnectTryFailedEvent()</code>
- </p>
- <p>
- An attempt was made to establish a connection
- to a known remote site, but the connection
- attempt failed.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepDupmasterEvent()</code>
- </p>
- <p>
- A duplicate master has been discovered in the
- replication group.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepElectedEvent()</code>
- </p>
- <p>
- The local site has just won an election and
- is now the master. Your code should now
- reconfigure itself to operation as a master
- site.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepElectionFailedEvent()</code>
- </p>
- <p>
- The local site's attempt to initiate or
- participate in a replication master election
- failed, due to the lack of timely message
- response from a sufficient number of remote
- sites.
- </p>
- </li>
- <li>
- <p>
- <code class="methodname">EventHandler.handleRepJoinFailureEvent()</code>
- </p>
- <p>
- The local site could not synchronize with the
- master because an internal initialization was
- required, but internal initialization has
- been turned off
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepLocalSiteRemovedEvent()</code>
- </p>
- <p>
- The local site has been removed from the group.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepNewMasterEvent()</code>
- </p>
- <p>
- An election was held and a new environment was made a
- master. However, the current environment <span class="emphasis"><em>is
- not</em></span> the master. This event exists so that
- you can cause your code to take some unique action in the
- event that the replication groups switches masters.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepMasterEvent()</code>
- </p>
- <p>
- The local environment is now a master.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepMasterFailureEvent()</code>
- </p>
- <p>
- The connection to the remote master replication site has failed.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepPermFailedEvent()</code>
- </p>
- <p>
- The Replication Manager did not receive enough acknowledgements to
- ensure the transaction's durability within the replicationg group.
- The Replication Manager has therefore flushed the transaction to
- the master's local disk for storage.
- </p>
- <p>
- How the Replication Manager knows whether the acknowledgements it
- has received is determined by the ack policy you have set for your
- applicaton. See <a class="xref" href="fwrkpermmessage.html#fmwrkpermpolicy" title="Identifying Permanent Message Policies">Identifying Permanent Message Policies</a>
- for more information.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepSiteAddedEvent()</code>
- </p>
- <p>
- A new site has joined the replication group.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepSiteRemovedEvent()</code>
- </p>
- <p>
- An existing site has been removed from the replication group.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleRepStartupDoneEvent()</code>
- </p>
- <p>
- The replica has completed startup
- synchronization and is now processing
- log records received from the master.
- </p>
- </li>
- <li>
- <p>
-
- <code class="methodname">EventHandler.handleWriteFailedEvent()</code>
- </p>
- <p>
- A Berkeley DB write to stable storage failed.
- </p>
- </li>
- </ul>
- </div>
- <p>
- Note that these events are raised whenever the
- state is established. That is, when the current
- environment becomes a replica, and that includes
- at application startup, the event is raised.
- Also, when an election is held and a replica is elected to be a
- master, then the event occurs.
- </p>
+ The <code class="classname">EventHandler</code> implementation is
+ fairly simple. First you detect the event, and then you
+ record the state change in some data member maintained in a
+ location that is convenient to you.
+ </p>
<p>
- The <code class="classname">EventHandler</code>
- implementation is fairly simple. First you detect
- the event, and then you record the state change
- in some data member maintained in a location that
- is convenient to you.
- </p>
- <p>
- For example:
- </p>
+ For example:
+ </p>
<pre class="programlisting">
package db.repquote;
@@ -372,9 +159,10 @@ isMaster = false;
// "this" class as the event handler
envConfig.setEventHandler(this); </pre>
<p>
- That done, we still need to implement the methods required for handling replication events.
- For a simple application like this one, these implementations can be trivial.
-</p>
+ That done, we still need to implement the methods required for
+ handling replication events. For a simple application like
+ this one, these implementations can be trivial.
+ </p>
<pre class="programlisting"> public void handleRepClientEvent()
{
dbenv.setIsMaster(false);
@@ -481,11 +269,11 @@ envConfig.setEventHandler(this); </pre>
System.exit(-1);
}</pre>
<p>
- Of course, this only gives us the current state of the environment. We
- still need the code that determines what to do when the environment
- changes state and how to behave depending on the state (described
- in the next section).
-</p>
+ Of course, this only gives us the current state of the
+ environment. We still need the code that determines what to do
+ when the environment changes state and how to behave depending
+ on the state (described in the next section).
+ </p>
</div>
</div>
<div class="navfooter">
diff --git a/docs/gsg_db_rep/JAVA/fwrkpermmessage.html b/docs/gsg_db_rep/JAVA/fwrkpermmessage.html
index 1eb4a3cf..9e0d769e 100644
--- a/docs/gsg_db_rep/JAVA/fwrkpermmessage.html
+++ b/docs/gsg_db_rep/JAVA/fwrkpermmessage.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>Permanent Message Handling</title>
+ <title>Replication Manager Permanent Message Handling</title>
<link rel="stylesheet" href="gettingStarted.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
@@ -14,11 +14,11 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
- <th colspan="3" align="center">Permanent Message Handling</th>
+ <th colspan="3" align="center">Replication Manager Permanent Message Handling</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="repmgr_init_example_c.html">Prev</a> </td>
@@ -32,7 +32,7 @@
<div class="titlepage">
<div>
<div>
- <h2 class="title" style="clear: both"><a id="fwrkpermmessage"></a>Permanent Message Handling</h2>
+ <h2 class="title" style="clear: both"><a id="fwrkpermmessage"></a>Replication Manager Permanent Message Handling</h2>
</div>
</div>
</div>
@@ -142,41 +142,6 @@
<ul type="disc">
<li>
<p>
-
- <code class="literal">ReplicationManagerAckPolicy.NONE</code>
- </p>
- <p>
- No permanent message acknowledgments are required. If
- this policy is selected, permanent message handling is
- essentially "turned off." That is, the master will
- never wait for replica acknowledgments. In this case,
- transaction log data is either flushed or not strictly
- depending on the type of commit that is being performed
- (synchronous or asynchronous).
- </p>
- </li>
- <li>
- <p>
-
- <code class="literal">ReplicationManagerAckPolicy.ONE</code>
- </p>
- <p>
- At least one replica must acknowledge the permanent
- message within the timeout period.
- </p>
- </li>
- <li>
- <p>
-
- <code class="literal">ReplicationManagerAckPolicy.ONE_PEER</code>
- </p>
- <p>
- At least one electable peer must acknowledge the permanent
- message within the timeout period.
- </p>
- </li>
- <li>
- <p>
<code class="literal">ReplicationManagerAckPolicy.ALL</code>
</p>
@@ -216,6 +181,41 @@
</li>
<li>
<p>
+
+ <code class="literal">ReplicationManagerAckPolicy.NONE</code>
+ </p>
+ <p>
+ No permanent message acknowledgments are required. If
+ this policy is selected, permanent message handling is
+ essentially "turned off." That is, the master will
+ never wait for replica acknowledgments. In this case,
+ transaction log data is either flushed or not strictly
+ depending on the type of commit that is being performed
+ (synchronous or asynchronous).
+ </p>
+ </li>
+ <li>
+ <p>
+
+ <code class="literal">ReplicationManagerAckPolicy.ONE</code>
+ </p>
+ <p>
+ At least one replica must acknowledge the permanent
+ message within the timeout period.
+ </p>
+ </li>
+ <li>
+ <p>
+
+ <code class="literal">ReplicationManagerAckPolicy.ONE_PEER</code>
+ </p>
+ <p>
+ At least one electable peer must acknowledge the permanent
+ message within the timeout period.
+ </p>
+ </li>
+ <li>
+ <p>
<code class="literal">ReplicationManagerAckPolicy.QUORUM</code>
</p>
diff --git a/docs/gsg_db_rep/JAVA/heartbeats.html b/docs/gsg_db_rep/JAVA/heartbeats.html
index 59a24668..875aa381 100644
--- a/docs/gsg_db_rep/JAVA/heartbeats.html
+++ b/docs/gsg_db_rep/JAVA/heartbeats.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -54,15 +54,16 @@
heartbeat on a defined interval when it is otherwise
idle. Do this by using the
- <span>
+ <span>
<code class="methodname">Environment.setReplicationTimeout()</code>
method.
You pass this method the
<code class="methodname">ReplicationTimeoutType.HEARTBEAT_SEND</code>
constant.
- </span>
- You must also provide the method a value representing the period between heartbeats in microseconds. Note that the heartbeat is sent only if the
- system is idle.
+ </span>
+ You must also provide the method a value representing the
+ period between heartbeats in microseconds. Note that the
+ heartbeat is sent only if the system is idle.
</p>
<p>
On the replica, you configure the application to listen
diff --git a/docs/gsg_db_rep/JAVA/index.html b/docs/gsg_db_rep/JAVA/index.html
index 875ff10d..51cbe3a5 100644
--- a/docs/gsg_db_rep/JAVA/index.html
+++ b/docs/gsg_db_rep/JAVA/index.html
@@ -12,7 +12,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -30,11 +30,11 @@
<div class="titlepage">
<div>
<div>
- <h1 class="title"><a id="idp11280"></a>Getting Started with Replicated Berkeley DB Applications</h1>
+ <h1 class="title"><a id="idp11184"></a>Getting Started with Replicated Berkeley DB Applications</h1>
</div>
<div>
<div class="legalnotice">
- <a id="idp76320"></a>
+ <a id="idp37792"></a>
<p class="legalnotice-title">
<b>Legal Notice</b>
</p>
@@ -68,7 +68,7 @@
<p>
To obtain a copy of this document's original source code, please
submit a request to the Oracle Technology Network forum at:
- <a class="ulink" href="http://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=271</a>
+ <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=271</a>
</p>
@@ -76,7 +76,7 @@
</div>
</div>
<div>
- <p class="pubdate">5/11/2012</p>
+ <p class="pubdate">2/17/2015</p>
</div>
</div>
<hr />
@@ -224,6 +224,11 @@
</dt>
</dl>
</dd>
+ <dt>
+ <span class="sect1">
+ <a href="eventhandling.html">Event Handling</a>
+ </span>
+ </dt>
</dl>
</dd>
<dt>
@@ -325,7 +330,7 @@
</dt>
<dt>
<span class="sect1">
- <a href="fwrkpermmessage.html">Permanent Message Handling</a>
+ <a href="fwrkpermmessage.html">Replication Manager Permanent Message Handling</a>
</span>
</dt>
<dd>
diff --git a/docs/gsg_db_rep/JAVA/introduction.html b/docs/gsg_db_rep/JAVA/introduction.html
index 11baf9a8..de13ca1d 100644
--- a/docs/gsg_db_rep/JAVA/introduction.html
+++ b/docs/gsg_db_rep/JAVA/introduction.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -144,6 +144,11 @@
</dt>
</dl>
</dd>
+ <dt>
+ <span class="sect1">
+ <a href="eventhandling.html">Event Handling</a>
+ </span>
+ </dt>
</dl>
</div>
<p>
diff --git a/docs/gsg_db_rep/JAVA/manageblock.html b/docs/gsg_db_rep/JAVA/manageblock.html
index 21e988c0..3496eb5d 100644
--- a/docs/gsg_db_rep/JAVA/manageblock.html
+++ b/docs/gsg_db_rep/JAVA/manageblock.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/JAVA/moreinfo.html b/docs/gsg_db_rep/JAVA/moreinfo.html
index 1143c4c7..0762eec1 100644
--- a/docs/gsg_db_rep/JAVA/moreinfo.html
+++ b/docs/gsg_db_rep/JAVA/moreinfo.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -56,7 +56,7 @@
<p>
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/gsg_txn/JAVA/index.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/gsg_txn/JAVA/index.html" target="_top">
Getting Started with Transaction Processing for Java
</a>
@@ -69,7 +69,7 @@
<p>
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/gsg/JAVA/index.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/gsg/JAVA/index.html" target="_top">
Getting Started with Berkeley DB for Java
</a>
@@ -83,14 +83,14 @@
<p>
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/collections/tutorial/index.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/collections/tutorial/index.html" target="_top">
Berkeley DB Collections Tutorial
</a>
</p>
</li>
<li>
<p>
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/programmer_reference/index.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/programmer_reference/index.html" target="_top">
Berkeley DB Programmer's Reference Guide
</a>
</p>
@@ -104,7 +104,7 @@
- <a class="ulink" href="http://download.oracle.com/docs/cd/E17076_02/html/java/index.html" target="_top">
+ <a class="ulink" href="http://docs.oracle.com/cd/E17076_02/html/java/index.html" target="_top">
Berkeley DB Javadoc
</a>
</p>
@@ -126,7 +126,7 @@
downloads, visit
- <a class="ulink" href="http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html" target="_top">http://www.oracle.com/technetwork/database/berkeleydb/downloads/index.html</a>.
+ <a class="ulink" href="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html" target="_top">http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html</a>.
</p>
</span>
<div class="sect2" lang="en" xml:lang="en">
@@ -141,8 +141,8 @@
You can post your comments and questions at the Oracle
Technology (OTN) forum for
<span>
- Oracle Berkeley DB at: <a class="ulink" href="http://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=271</a>,
- or for Oracle Berkeley DB High Availability at: <a class="ulink" href="http://forums.oracle.com/forums/forum.jspa?forumID=272" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=272</a>.
+ Oracle Berkeley DB at: <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=271</a>,
+ or for Oracle Berkeley DB High Availability at: <a class="ulink" href="https://forums.oracle.com/forums/forum.jspa?forumID=272" target="_top">https://forums.oracle.com/forums/forum.jspa?forumID=272</a>.
</span>
diff --git a/docs/gsg_db_rep/JAVA/permmessages.html b/docs/gsg_db_rep/JAVA/permmessages.html
index d5f8b198..d5f4c1a1 100644
--- a/docs/gsg_db_rep/JAVA/permmessages.html
+++ b/docs/gsg_db_rep/JAVA/permmessages.html
@@ -9,12 +9,12 @@
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
<link rel="up" href="introduction.html" title="Chapter 1. Introduction" />
<link rel="prev" href="elections.html" title="Holding Elections" />
- <link rel="next" href="txnapp.html" title="Chapter 2. Transactional Application" />
+ <link rel="next" href="eventhandling.html" title="Event Handling" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -23,7 +23,7 @@
<tr>
<td width="20%" align="left"><a accesskey="p" href="elections.html">Prev</a> </td>
<th width="60%" align="center">Chapter 1. Introduction</th>
- <td width="20%" align="right"> <a accesskey="n" href="txnapp.html">Next</a></td>
+ <td width="20%" align="right"> <a accesskey="n" href="eventhandling.html">Next</a></td>
</tr>
</table>
<hr />
@@ -90,29 +90,29 @@
message acknowledgment.
</p>
<p>
- For the master (again, using the Replication Manager), things are a little more complicated than
- simple message acknowledgment. Usually in a replicated
- application, the master commits transactions
- asynchronously; that is, the commit operation does not
- block waiting for log data to be flushed to disk before
- returning. So when a master is managing permanent
+ For the master (again, using the Replication Manager), things are a
+ little more complicated than simple message acknowledgment.
+ Usually in a replicated application, the master commits
+ transactions asynchronously; that is, the commit operation
+ does not block waiting for log data to be flushed to disk
+ before returning. So when a master is managing permanent
messages, it typically blocks the committing thread
immediately before <code class="methodname">commit()</code>
- returns. The thread then waits for acknowledgments from
- its replicas. If it receives enough acknowledgments, it
+ returns. The thread then waits for acknowledgments from its
+ replicas. If it receives enough acknowledgments, it
continues to operate as normal.
</p>
<p>
- If the master does not
- receive message acknowledgments — or, more likely, it does not receive
+ If the master does not receive message acknowledgments
+ — or, more likely, it does not receive
<span class="emphasis"><em>enough</em></span> acknowledgments — the
committing thread flushes its log data to disk and then
continues operations as normal. The master application can
do this because replicas that fail to handle a message, for
whatever reason, will eventually catch up to the master. So
by flushing the transaction logs to disk, the master is
- ensuring that the data modifications have made it to
- stable storage in one location (its own hard drive).
+ ensuring that the data modifications have made it to stable
+ storage in one location (its own hard drive).
</p>
<div class="sect2" lang="en" xml:lang="en">
<div class="titlepage">
@@ -195,7 +195,7 @@
replicas.
</p>
<p>
- That said, it is important to remember that
+ That said, remember that
managing permanent messages involves a fair amount
of network traffic. The messages must be sent to
the replicas and the replicas must acknowledge
@@ -268,85 +268,16 @@
depends on which API you are using to implement
replication. If you are using the Replication Manager, then
permanent message handling is configured using
- policies that you specify to the framework. In
- this case, you can configure your application
- to:
- </p>
- <div class="itemizedlist">
- <ul type="disc">
- <li>
- <p>
- Ignore permanent messages (the master
- does not wait for acknowledgments).
- </p>
- </li>
- <li>
- <p>
- Require acknowledgments from a
- quorum. A quorum is reached when
- acknowledgments are received from the
- minimum number of electable
- peers needed to ensure that
- the record remains durable if
- an election is held.
- </p>
- <p>
- An <span class="emphasis"><em>electable peer</em></span> is any other
- site that potentially can be elected master.
- </p>
- <p>
- The goal here is to be
- absolutely sure the record is
- durable. The master wants to
- hear from enough electable
- peer that they have
- committed the record so that if
- an election is held, the master
- knows the record will exist even
- if a new master is selected.
- </p>
- <p>
- This is the default policy.
- </p>
- </li>
- <li>
- <p>
- Require an acknowledgment from at least one replica.
- </p>
- </li>
- <li>
- <p>
- Require acknowledgments from
- all replicas.
- </p>
- </li>
- <li>
- <p>
- Require an acknowledgment from at least one electable peer.
- </p>
- </li>
- <li>
- <p>
- Require acknowledgments from all electable peers.
- </p>
- </li>
- </ul>
- </div>
- <p>
- Note that the Replication Manager simply flushes its transaction
- logs and moves on if a permanent message is not
- sufficiently acknowledged.
- </p>
- <p>
- For details on permanent message handling with the
- Replication Manager, see <a class="xref" href="fwrkpermmessage.html" title="Permanent Message Handling">Permanent Message Handling</a>.
+ policies that you specify to the framework.
+ For a list of these policies, see
+ <a class="xref" href="fwrkpermmessage.html" title="Replication Manager Permanent Message Handling">Replication Manager Permanent Message Handling</a>.
</p>
<p>
If these policies are not sufficient for your
needs, or if you want your application to take more
corrective action than simply flushing log buffers
in the event of an unsuccessful commit, then you
- must use implement replication using the Base APIs.
+ must implement replication using the Base APIs.
</p>
<p>
When using the Base APIs, messages are
@@ -395,14 +326,14 @@
<td width="20%" align="center">
<a accesskey="u" href="introduction.html">Up</a>
</td>
- <td width="40%" align="right"> <a accesskey="n" href="txnapp.html">Next</a></td>
+ <td width="40%" align="right"> <a accesskey="n" href="eventhandling.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Holding Elections </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
- <td width="40%" align="right" valign="top"> Chapter 2. Transactional Application</td>
+ <td width="40%" align="right" valign="top"> Event Handling</td>
</tr>
</table>
</div>
diff --git a/docs/gsg_db_rep/JAVA/preface.html b/docs/gsg_db_rep/JAVA/preface.html
index 3853c16b..9f7eea8d 100644
--- a/docs/gsg_db_rep/JAVA/preface.html
+++ b/docs/gsg_db_rep/JAVA/preface.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -64,7 +64,7 @@
</div>
<p>
This document describes how to write replicated applications for
- Berkeley DB 11<span class="emphasis"><em>g</em></span> Release 2 (library version 11.2.5.3). The APIs used to
+ Berkeley DB 12<span class="emphasis"><em>c</em></span> Release 1 (library version 12.1.6.1). The APIs used to
implement replication in your application are described here. This
book describes the concepts surrounding replication, the scenarios
under which you might choose to use it, and the architectural
diff --git a/docs/gsg_db_rep/JAVA/processingloop.html b/docs/gsg_db_rep/JAVA/processingloop.html
index 651c1fb2..abdde716 100644
--- a/docs/gsg_db_rep/JAVA/processingloop.html
+++ b/docs/gsg_db_rep/JAVA/processingloop.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/JAVA/repadvantage.html b/docs/gsg_db_rep/JAVA/repadvantage.html
index 1e4942a6..0eb7f762 100644
--- a/docs/gsg_db_rep/JAVA/repadvantage.html
+++ b/docs/gsg_db_rep/JAVA/repadvantage.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -153,7 +153,7 @@
your replication group.
</p>
<p>
- For more information, see <a class="xref" href="fwrkpermmessage.html" title="Permanent Message Handling">Permanent Message Handling</a>.
+ For more information, see <a class="xref" href="fwrkpermmessage.html" title="Replication Manager Permanent Message Handling">Replication Manager Permanent Message Handling</a>.
</p>
</li>
</ul>
diff --git a/docs/gsg_db_rep/JAVA/repapp.html b/docs/gsg_db_rep/JAVA/repapp.html
index 29d56d6e..88e9a924 100644
--- a/docs/gsg_db_rep/JAVA/repapp.html
+++ b/docs/gsg_db_rep/JAVA/repapp.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -73,7 +73,7 @@
</dt>
<dt>
<span class="sect1">
- <a href="fwrkpermmessage.html">Permanent Message Handling</a>
+ <a href="fwrkpermmessage.html">Replication Manager Permanent Message Handling</a>
</span>
</dt>
<dd>
@@ -173,10 +173,8 @@
environment's priority, setting the TCP/IP address that
this replication environment will use for incoming
replication messages, identifying TCP/IP addresses of other
- replication environments, setting the number of replication
- environments in the replication group, and so forth. These
- actions are discussed throughout the remainder of this
- chapter.
+ replication environments, and so forth. These actions are
+ discussed throughout the remainder of this chapter.
</p>
</li>
<li>
@@ -215,13 +213,6 @@
</li>
</ol>
</div>
- <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
- <h3 class="title">Note</h3>
- <p>
- The Replication Manager allows you to only use one environment handle per
- process.
- </p>
- </div>
<p>
When you are ready to shut down your application:
</p>
diff --git a/docs/gsg_db_rep/JAVA/repmgr_init_example_c.html b/docs/gsg_db_rep/JAVA/repmgr_init_example_c.html
index 823eba6f..e067c792 100644
--- a/docs/gsg_db_rep/JAVA/repmgr_init_example_c.html
+++ b/docs/gsg_db_rep/JAVA/repmgr_init_example_c.html
@@ -9,12 +9,12 @@
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
<link rel="up" href="repapp.html" title="Chapter 3. The DB Replication Manager" />
<link rel="prev" href="repapp.html" title="Chapter 3. The DB Replication Manager" />
- <link rel="next" href="fwrkpermmessage.html" title="Permanent Message Handling" />
+ <link rel="next" href="fwrkpermmessage.html" title="Replication Manager Permanent Message Handling" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -132,12 +132,12 @@ public class RepConfig
// String specifying the home directory for rep files.
public String home;
// Stores an optional set of "other" hosts.
- <strong class="userinput"><code>public Vector&lt;ReplicationHostAddress&gt; otherHosts;
+ <strong class="userinput"><code>private Vector otherHosts;
// Priority within the replication group.
public int priority;
public ReplicationManagerStartPolicy startPolicy;
// The host address to listen to.
- public ReplicationHostAddress thisHost;
+ private ReplicationManagerSiteConfig thisHost;
// member variables used internally.
private int currOtherHost;
@@ -230,7 +230,7 @@ public class RepConfig
<p>
Having completed our update to the
- <code class="classname">RepConfig</code>
+ <code class="classname">SimpleConfig</code>
class, we can now start making
changes to the main portion of our program. We begin by changing
the program's name. <span>(This, of course, means that we copy our
@@ -263,7 +263,7 @@ import db.repquote.RepConfig;
public class <strong class="userinput"><code>RepQuoteExampleGSG</code></strong>
{
private RepConfig repConfig;
- private Environment dbenv; </pre>
+ private RepQuoteEnvironment dbenv; </pre>
<p>
Next we update our usage function. The application will continue to
accept the <code class="literal">-h</code> parameter so that we can identify
@@ -312,7 +312,7 @@ public class <strong class="userinput"><code>RepQuoteExampleGSG</code></strong>
public static void usage()
{
System.err.println("usage: " + repConfig.progname);
- System.err.println("-h home<strong class="userinput"><code>[-r host:port][-l|-L host:port]" +
+ System.err.println("-h home<strong class="userinput"><code> -l|-L host:port" +
"[-r host:port][-p priority]</code></strong>");
System.err.println("\t -h home directory (required)\n" +
@@ -337,7 +337,7 @@ public class <strong class="userinput"><code>RepQuoteExampleGSG</code></strong>
throws Exception
{
RepConfig config = new RepConfig();
- <strong class="userinput"><code>String tmpHost;
+ <strong class="userinput"><code>boolean isCreator = false;
int tmpPort = 0;</code></strong> </pre>
<p>
Now we collect our command line arguments. As we do so, we will
@@ -497,7 +497,8 @@ public class <strong class="userinput"><code>RepQuoteExampleGSG</code></strong>
envConfig.setInitializeCache(true);
envConfig.setTransactional(true);
try {
- dbenv = new Environment(appConfig.getHome(), envConfig);
+ dbenv = new RepQuoteEnvironment
+ (repConfig.getHome(), envConfig);
} catch(FileNotFoundException e) {
System.err.println("FileNotFound exception: " + e.toString());
System.err.println(
@@ -541,7 +542,7 @@ public class <strong class="userinput"><code>RepQuoteExampleGSG</code></strong>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
- <td width="40%" align="right" valign="top"> Permanent Message Handling</td>
+ <td width="40%" align="right" valign="top"> Replication Manager Permanent Message Handling</td>
</tr>
</table>
</div>
diff --git a/docs/gsg_db_rep/JAVA/rywc.html b/docs/gsg_db_rep/JAVA/rywc.html
index a20382b6..44bacdfd 100644
--- a/docs/gsg_db_rep/JAVA/rywc.html
+++ b/docs/gsg_db_rep/JAVA/rywc.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
diff --git a/docs/gsg_db_rep/JAVA/simpleprogramlisting.html b/docs/gsg_db_rep/JAVA/simpleprogramlisting.html
index bde88155..777b40b8 100644
--- a/docs/gsg_db_rep/JAVA/simpleprogramlisting.html
+++ b/docs/gsg_db_rep/JAVA/simpleprogramlisting.html
@@ -14,7 +14,7 @@
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
@@ -201,11 +201,11 @@ import com.sleepycat.db.Environment;
import com.sleepycat.db.EnvironmentConfig;
import com.sleepycat.db.LockMode;
import com.sleepycat.db.OperationStatus;
-import db.repquote_gsg.RepConfig;
+import db.repquote_gsg.SimpleConfig;
public class SimpleTxn
{
- private RepConfig repConfig;
+ private SimpleConfig simpleConfig;
private Environment dbenv; </pre>
<p>
Next, we provide our class constructor. This simply initializes our
@@ -214,7 +214,7 @@ public class SimpleTxn
<pre class="programlisting"> public SimpleTxn()
throws DatabaseException
{
- repConfig = null;
+ simpleConfig = null;
dbenv = null;
} </pre>
<p>
@@ -223,11 +223,9 @@ public class SimpleTxn
</p>
<pre class="programlisting"> public static void usage()
{
- System.err.println("usage: " + repConfig.progname);
+ System.err.println("usage: " + simpleConfig.progname);
System.err.println("-h home");
- System.err.println("\t -h home directory\n");
-
System.exit(1);
} </pre>
</div>
@@ -254,7 +252,7 @@ public class SimpleTxn
<pre class="programlisting"> public static void main(String[] argv)
throws Exception
{
- RepConfig config = new RepConfig();
+ SimpleConfig config = new SimpleConfig();
// Extract the command line parameters
for (int i = 0; i &lt; argv.length; i++)
{
@@ -326,16 +324,16 @@ public class SimpleTxn
We do this because the application will eventually be replicated and
so we don't need a high durability guarantee.
</p>
- <pre class="programlisting"> public int init(RepConfig config)
+ <pre class="programlisting"> public int init(SimpleConfig config)
throws DatabaseException
{
int ret = 0;
- repConfig = config;
+ simpleConfig = config;
EnvironmentConfig envConfig = new EnvironmentConfig();
envConfig.setErrorStream(System.err);
- envConfig.setErrorPrefix(RepConfig.progname);
+ envConfig.setErrorPrefix(SimpleConfig.progname);
- envConfig.setCacheSize(RepConfig.CACHESIZE);
+ envConfig.setCacheSize(SimpleConfig.CACHESIZE);
envConfig.setTxnNoSync(true);
envConfig.setAllowCreate(true);
@@ -345,7 +343,7 @@ public class SimpleTxn
envConfig.setInitializeCache(true);
envConfig.setTransactional(true);
try {
- dbenv = new Environment(repConfig.getHome(), envConfig);
+ dbenv = new Environment(simpleConfig.getHome(), envConfig);
} catch(FileNotFoundException e) {
System.err.println("FileNotFound exception: " + e.toString());
System.err.println(
@@ -408,9 +406,9 @@ public class SimpleTxn
try {
db = dbenv.openDatabase(null, // Txn handle
- RepConfig.progname, // db filename
- null, // db name
- dbconf);
+ SimpleConfig.progname, // db filename
+ null, // db name
+ dbconf);
} catch (FileNotFoundException fnfe) {
System.err.println("File not found exception" +
fnfe.toString());
diff --git a/docs/gsg_db_rep/JAVA/txnapp.html b/docs/gsg_db_rep/JAVA/txnapp.html
index 4fe5ad06..e962f477 100644
--- a/docs/gsg_db_rep/JAVA/txnapp.html
+++ b/docs/gsg_db_rep/JAVA/txnapp.html
@@ -8,20 +8,20 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
<link rel="start" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
<link rel="up" href="index.html" title="Getting Started with Replicated Berkeley DB Applications" />
- <link rel="prev" href="permmessages.html" title="Permanent Message Handling" />
+ <link rel="prev" href="eventhandling.html" title="Event Handling" />
<link rel="next" href="simpleprogramlisting.html" title="Program Listing" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
- <p>Library Version 11.2.5.3</p>
+ <p>Library Version 12.1.6.1</p>
</div>
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Chapter 2. Transactional Application</th>
</tr>
<tr>
- <td width="20%" align="left"><a accesskey="p" href="permmessages.html">Prev</a> </td>
+ <td width="20%" align="left"><a accesskey="p" href="eventhandling.html">Prev</a> </td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="simpleprogramlisting.html">Next</a></td>
</tr>
@@ -164,12 +164,12 @@ QUOTESERVER&gt; quit
<hr />
<table width="100%" summary="Navigation footer">
<tr>
- <td width="40%" align="left"><a accesskey="p" href="permmessages.html">Prev</a> </td>
+ <td width="40%" align="left"><a accesskey="p" href="eventhandling.html">Prev</a> </td>
<td width="20%" align="center"> </td>
<td width="40%" align="right"> <a accesskey="n" href="simpleprogramlisting.html">Next</a></td>
</tr>
<tr>
- <td width="40%" align="left" valign="top">Permanent Message Handling </td>
+ <td width="40%" align="left" valign="top">Event Handling </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>