From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- docs/programmer_reference/rep_filename.html | 288 +++++++++++++++++----------- 1 file changed, 180 insertions(+), 108 deletions(-) (limited to 'docs/programmer_reference/rep_filename.html') diff --git a/docs/programmer_reference/rep_filename.html b/docs/programmer_reference/rep_filename.html index b528ee6d..8b4e07ae 100644 --- a/docs/programmer_reference/rep_filename.html +++ b/docs/programmer_reference/rep_filename.html @@ -3,28 +3,26 @@ - Managing Replication Files + Managing replication directories and files - + +

+ Whether you use the Base API or the Replication + Manager, replication creates a set of internal files that + are normally stored on-disk in your environment home + directory. These files contain metadata which is necessary + for replication operations, and so you should never delete + these files. +

+

+ You can cause these files to not be stored on disk, but + instead to be held entirely in-memory, by specifying the + DB_REP_CONF_INMEM flag to the DB_ENV->rep_set_config() method. Doing + this can improve your application's data throughput by + avoiding the disk I/O associated with these metadata + files. However, in the event that your application is shut + down, the contents of these files are lost. This results + in some loss of functionality, including an increased + chance that elections will fail, or that the wrong site + will win an election. See the DB_REP_CONF_INMEM flag + description for more information. +

+

+ Note that turning on DB_REP_CONF_INMEM means that + Replication Manager cannot store group membership changes + persistently. This is because Replication Manager stores + group membership information in an internal database, + which is held in memory when DB_REP_CONF_INMEM is turned + on. For this reason, if your Replication Manager + application requires replication metadata to be stored in + memory, then you must manually identify all the sites in + your replication group using the + DB_LEGACY site configuration + attribute. Be aware that this configuration needs to be + made permanent. (Normally, DB_LEGACY is + used only on a temporary basis for the purpose of + upgrading old Replication Manager applications.) +

+

Do the following: +

+
+
    +
  1. +

    + Shut down all the sites in your replication + group. +

    +
  2. +
  3. +

    + For every site in your replication group: +

    +
    +
      +
    1. +

      + Configure a DB_SITE handle for the + local site. Use DB_SITE->set_config() to + indicate that this is a legacy site by + setting the DB_LEGACY + parameter. +

      +
    2. +
    3. +

      + Configure a DB_SITE handle for + every other site + in the replication group. Set the + DB_LEGACY parameter + for each of these handles. +

      +

      + Please pay careful attention to this + step. To repeat: a DB_SITE handle MUST be + configured for EVERY site in the + replication group. +

      +
    4. +
    +
    +
  4. +
  5. +

    + Restart all the sites in the replication group. +

    +
  6. +
+
+

+ Alternatively, you can store persistent environment + metadata files, including those required by replication, + in a location other than your environment home directory. + This is necessary if your environment home directory is on + a device that is unstable, because the persistent metadata + files cannot be lost or deleted. You do this using the + DB_ENV->set_metadata_dir() method. +

+

+ Note that you must configure the handling of your + environment metadata consistently across your entire + replication group. That is, if you place your replication + metadata in-memory on one site, then it must be placed + in-memory on all the sites in the group. Similarly, if you + place your replication metadata files in a non-standard + directory location on one site, then they must be placed + in the exact same directory location on all the sites in + your group. +

-

- Alternatively, you can store persistent environment metadata files, - including those required by replication, in a location other than - your environment home directory. Doing so can help improve I/O - throughput by placing these files on a spindle that is not being - used for other environment data I/O. You do this using the - DB_ENV->set_metadata_dir() method. -

-

- Note that you must configure the handling of your environment - metadata consistently across your entire replication group. That - is, if you place your replication metadata in-memory on one - site, then it must be placed in-memory on all the sites in the - group. Similarly, if you place your replication metadata files in a - non-standard directory location on one site, then they must be - placed in the exact same directory location on all the sites in - your group. -

-- cgit v1.2.1