Berkeley DB: dbenv_set_tx_recover
ee,hash,hashing,transaction,transactions,locking,logging,access method,access me
thods,java,C,C++">
dbenv_set_tx_recover
#include <db_cxx.h>
typedef int (*tx_recover_fcn)(DB_LOG *, DBT *, DB_LSN *, int, void *);
void DbEnv::set_tx_recover(tx_recover_fcn);
Description
Set the function that is called by DbTxn::abort during transaction
abort.
This function takes five arguments:
- logp
- A pointer to the transaction log (DB_LOG *).
- log_rec
- A log record.
- lsnp
- A pointer to a log sequence number (DB_LSN *).
- redo
- An integer value that is set to one of the following values:
- DB_TXN_BACKWARD_ROLL
- The log is being read backward to determine which transactions have been
committed and which transactions were not (and should therefore be aborted
during recovery).
- DB_TXN_FORWARD_ROLL
- The log is being played forward, any transaction ids encountered that
have not been entered into the list referenced by
info should be ignored.
- DB_TXN_OPENFILES
- The log is being read to open all the files required to perform recovery.
- DB_TXN_REDO
- Redo the operation described by the log record.
- DB_TXN_UNDO
- Undo the operation described by the log record.
- info
- An opaque pointer used to reference the list of transaction IDs encountered
during recovery.
If no recover function is specified, the default is that only Berkeley DB access
method operations are transaction protected, and the default recover function
will be used.
Class
DbEnv
See Also
DbEnv::appinit,
DbEnv::appexit,
DbEnv::version,
DbEnv::get_lg_info,
DbEnv::get_lk_info,
DbEnv::get_mp_info,
DbEnv::get_tx_info,
dbenv_set_data_dir,
DbEnv::set_errcall,
DbEnv::set_errfile,
DbEnv::set_error_model,
DbEnv::set_error_stream,
DbEnv::set_errpfx,
DbEnv::set_lg_max,
DbEnv::set_lk_conflicts,
DbEnv::set_lk_detect,
DbEnv::set_lk_modes,
DbEnv::set_lorder,
DbEnv::set_mp_mmapsize,
DbEnv::set_mp_size,
DbEnv::set_tx_max,
dbenv_set_tx_recover
and
DbEnv::set_verbose.
|