head 1.2; access; symbols RPM_4_2_1:1.1.1.4 RPM_4_2:1.1.1.4 RPM_4_1_1:1.1.1.4 RPM_4_1:1.1.1.3 RPM_4_0_5:1.1.1.2 RPM_4_0_4:1.1.1.1 RPM:1.1.1; locks; strict; comment @# @; 1.2 date 2008.01.02.09.53.30; author rse; state dead; branches; next 1.1; commitid z4cpSiAhOCXk5PLs; 1.1 date 2002.01.08.00.30.10; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2002.01.08.00.30.10; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2003.01.18.13.48.59; author rse; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2001.12.06.00.08.06; author rse; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2003.01.18.14.04.58; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @
DbEnv::rep_process_message |
![]() ![]() |
#include <db_cxx.h>int DbEnv::rep_process_message(Dbt *control, Dbt *rec, int *envid)
The DbEnv::rep_process_message method processes an incoming replication message sent by a member of the replication group to the local database environment.
The rec and control parameters should reference a copy of the parameters specified by Berkeley DB for the rec and control parameters on the sending environment.
The envid parameter should contain the local identifier that corresponds to the environment that sent the message to be processed (see Replication environment IDs for more information).
For implementation reasons, all incoming replication messages must be processed using the same DbEnv handle. It is not required that a single thread of control process all messages, only that all threads of control processing messages use the same handle.
The DbEnv::rep_process_message method may return one of several special conditions:
Otherwise, the DbEnv::rep_process_message method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.
The DbEnv::rep_process_message method may fail and throw an exception or return a non-zero error for errors specified for other Berkeley DB and C library or system methods. If a catastrophic error has occurred, the DbEnv::rep_process_message method may fail and either return DB_RUNRECOVERY or throw an exception encapsulating DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.
![]() ![]() |
Copyright Sleepycat Software @ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @Import: RPM 4.0.4 @ text @@ 1.1.1.2 log @Import: RPM 4.0.5 @ text @d1 2 a2 2 a3 1 d39 1 a39 1 processed using the same DbEnv handle. It is not required that d42 13 a54 9
If a new master has been elected, the DbEnv::rep_process_message method will return DB_REP_NEWMASTER. The envid parameter contains the environment ID of the new master. If the recipient of this error return has been made master, it is the application's responsibility to begin acting as the master environment.
If the system received contact information from a new environment, the DbEnv::rep_process_message method will return DB_REP_NEWSITE. The rec parameter contains the opaque data specified in the d58 6 a63 16
If the replication group has more than one master, the DbEnv::rep_process_message method either returns DB_REP_DUPMASTER or throws an exception that encapsulates DB_REP_DUPMASTER. The application should reconfigure itself as a client by calling the DbEnv::rep_start method, and then call for an election by calling DbEnv::rep_elect.
If an election is needed, the DbEnv::rep_process_message method either returns DB_REP_HOLDELECTION or throws an exception that encapsulates DB_REP_HOLDELECTION. The application should call for an election by calling DbEnv::rep_elect.
If the current environment's logs are too far out of date with respect to the master to be automatically synchronized, the DbEnv::rep_process_message method either returns DB_REP_OUTDATED or throws an exception that encapsulates DB_REP_OUTDATED. The application should copy over a hot backup of the environment, run recovery, and restart the client.
Otherwise, the DbEnv::rep_process_message method either returns a non-zero error value or throws an exception that d67 4 a70 6 If a catastrophic error has occurred, the DbEnv::rep_process_message method may fail and either return DB_RUNRECOVERY or throw a DbRunRecoveryException, in which case all subsequent Berkeley DB calls will fail in the same way.
The DbEnv::rep_process_message method may return one of several special conditions:
Otherwise, the DbEnv::rep_process_message method either returns a non-zero error value or throws an exception that d74 6 a79 4 If a catastrophic error has occurred, the DbEnv::rep_process_message method may fail and either return DB_RUNRECOVERY or throw an exception encapsulating DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way. d81 1 a81 5 DbEnv::rep_start, DbEnv::rep_elect, DbEnv::rep_process_message, and DbEnv::set_rep_transport. @ 1.1.1.4 log @Import: RPM 4.1.1 @ text @d1 2 a2 2 a3 1 d39 1 a39 1 processed using the same DbEnv handle. It is not required that d42 13 a54 9
If a new master has been elected, the DbEnv::rep_process_message method will return DB_REP_NEWMASTER. The envid parameter contains the environment ID of the new master. If the recipient of this error return has been made master, it is the application's responsibility to begin acting as the master environment.
If the system received contact information from a new environment, the DbEnv::rep_process_message method will return DB_REP_NEWSITE. The rec parameter contains the opaque data specified in the d58 6 a63 16
If the replication group has more than one master, the DbEnv::rep_process_message method either returns DB_REP_DUPMASTER or throws an exception that encapsulates DB_REP_DUPMASTER. The application should reconfigure itself as a client by calling the DbEnv::rep_start method, and then call for an election by calling DbEnv::rep_elect.
If an election is needed, the DbEnv::rep_process_message method either returns DB_REP_HOLDELECTION or throws an exception that encapsulates DB_REP_HOLDELECTION. The application should call for an election by calling DbEnv::rep_elect.
If the current environment's logs are too far out of date with respect to the master to be automatically synchronized, the DbEnv::rep_process_message method either returns DB_REP_OUTDATED or throws an exception that encapsulates DB_REP_OUTDATED. The application should copy over a hot backup of the environment, run recovery, and restart the client.
Otherwise, the DbEnv::rep_process_message method either returns a non-zero error value or throws an exception that d67 4 a70 6 If a catastrophic error has occurred, the DbEnv::rep_process_message method may fail and either return DB_RUNRECOVERY or throw a DbRunRecoveryException, in which case all subsequent Berkeley DB calls will fail in the same way.