132 lines
4.7 KiB
Plaintext
132 lines
4.7 KiB
Plaintext
m4_comment([$Id])
|
|
|
|
define(M4PAGELOCAL,
|
|
[dbenv_log_set_config, dbenv_log_get_config,
|
|
DB_LOG_DIRECT, DB_LOG_DSYNC, DB_LOG_AUTO_REMOVE,
|
|
DB_LOG_BUFFER_FULL, DB_LOG_IN_MEMORY, DB_LOG_ZERO])
|
|
include(m4/m4.seealso)
|
|
|
|
m4_pf_header(m4_ref(dbenv_log_set_config),
|
|
ifelse(M4API, C_API, [dnl
|
|
int
|
|
DB_ENV-__GT__log_set_config(DB_ENV *dbenv, u_int32_t flags, int onoff);
|
|
m4_blank
|
|
int
|
|
DB_ENV-__GT__log_get_config(DB_ENV *dbenv, u_int32_t which, int *onoffp);
|
|
])
|
|
ifelse(M4API, CXX_API, [dnl
|
|
int
|
|
DbEnv::log_set_config(u_int32_t flags, int onoff);
|
|
m4_blank
|
|
int
|
|
DbEnv::log_get_config(u_int32_t which, int *onoffp)
|
|
]))
|
|
|
|
m4_p([dnl
|
|
The m4_refT(dbenv_log_set_config) configures the m4_db logging
|
|
subsystem.])
|
|
|
|
m4_scope_env(dbenv_log_set_config)
|
|
m4_when_any(dbenv_log_set_config)
|
|
m4_return(dbenv_log_set_config, std)
|
|
|
|
m4_parambegin
|
|
m4_param(flags, [dnl
|
|
m4_sf_or_must
|
|
|
|
m4_tagbegin
|
|
|
|
m4_idefz([turn off system @buffering for log files])
|
|
m4_tag(m4_idef(DB_LOG_DIRECT), [dnl
|
|
Turn off system buffering of m4_db log files to avoid double caching.
|
|
m4_scope_dbenv_flags(dbenv_log_set_config, DB_LOG_DIRECT, config)
|
|
m4_env_flags_any(DB_LOG_DIRECT)])
|
|
|
|
m4_idefz([turn off system @buffering for log files])
|
|
m4_tag(m4_idef(DB_LOG_DSYNC), [dnl
|
|
Configure m4_db to flush log writes to the backing disk before returning
|
|
from the write system call, rather than flushing log writes explicitly
|
|
in a separate system call, as necessary. This is only available on some
|
|
systems (for example, systems supporting the m4_posix1_name standard
|
|
O_DSYNC flag, or systems supporting the Windows FILE_FLAG_WRITE_THROUGH
|
|
flag). This flag may result in inaccurate file modification times and
|
|
other file-level information for m4_db log files. This flag may offer
|
|
a performance increase on some systems and a performance decrease on
|
|
others.
|
|
m4_scope_dbenv_flags(dbenv_log_set_config, DB_LOG_DSYNC, config)
|
|
m4_env_flags_any(DB_LOG_DSYNC)])
|
|
|
|
m4_idefz([automatic @log file removal])
|
|
m4_tag(m4_idef(DB_LOG_AUTO_REMOVE), [dnl
|
|
If set, m4_db will automatically remove log files that are no longer
|
|
needed.
|
|
m4_p([dnl
|
|
Automatic log file removal is likely to make catastrophic recovery
|
|
impossible.])
|
|
m4_p([dnl
|
|
Replication applications will rarely want to configure automatic log
|
|
file removal as it increases the likelihood a master will be unable to
|
|
satisfy a client's request for a recent log record.])
|
|
m4_scope_env_flags(dbenv_log_set_config, DB_LOG_AUTO_REMOVE)
|
|
m4_env_flags_any(DB_LOG_AUTO_REMOVE)])
|
|
|
|
m4_idefz([in memory @logs])
|
|
m4_tag(m4_idef(DB_LOG_IN_MEMORY), [dnl
|
|
If set, maintain transaction logs in memory rather than on disk. This
|
|
means that transactions exhibit the ACI (atomicity, consistency, and
|
|
isolation) properties, but not D (durability); that is, database
|
|
integrity will be maintained, but if the application or system fails,
|
|
integrity will not persist. All database files must be verified and/or
|
|
restored from a replication group master or archival backup after
|
|
application or system failure.
|
|
m4_p([dnl
|
|
When in-memory logs are configured and no more log buffer space is
|
|
available, m4_db methods may return an additional error value,
|
|
m4_idef(DB_LOG_BUFFER_FULL). When choosing log buffer and file sizes
|
|
for in-memory logs, applications should ensure the in-memory log buffer
|
|
size is large enough that no transaction will ever span the entire
|
|
buffer, and avoid a state where the in-memory buffer is full and no
|
|
space can be freed because a transaction that started in the first log
|
|
"file" is still active.])
|
|
m4_scope_env_flags(dbenv_log_set_config, DB_LOG_IN_MEMORY, config)
|
|
m4_env_flags_open(DB_LOG_IN_MEMORY, before)])
|
|
|
|
m4_idefz([pre-zero @log files])
|
|
m4_tag(m4_idef(DB_LOG_ZERO), [dnl
|
|
If set, zero all pages of a log file when that log file is created. This
|
|
has shown to provide greater transaction throughput in some environments.
|
|
The log file will be zeroed by the thread which needs to re-create the new log
|
|
file. Other threads may not write to the log file while this is happening.
|
|
m4_scope_env_flags(dbenv_log_set_config, DB_LOG_ZERO, config)
|
|
m4_env_flags_open(DB_LOG_ZERO, before)])
|
|
m4_tagend])
|
|
|
|
m4_param(onoff, [dnl
|
|
If the m4_arg(onoff) parameter is zero, the specified flags are cleared;
|
|
otherwise they are set.])
|
|
m4_paramend
|
|
|
|
m4_err(dbenv_log_set_config, einval)
|
|
|
|
m4_pf_description(m4_ref(dbenv_log_get_config))
|
|
m4_p([dnl
|
|
The m4_refT(dbenv_log_get_config) returns whether the specified m4_arg(which)
|
|
parameter is currently set or not.])
|
|
|
|
m4_when_any(dbenv_log_get_config)
|
|
|
|
m4_return(dbenv_log_get_config, std)
|
|
|
|
m4_parambegin
|
|
m4_param(which, [dnl
|
|
The m4_arg(which) parameter is the message value for which configuration
|
|
is being checked.])
|
|
m4_param_co(onoffp, [dnl
|
|
configuration of the specified m4_arg(which) parameter],, [dnl
|
|
If the returned m4_arg(onoff) value is zero, the parameter is off;
|
|
otherwise on.])
|
|
m4_paramend
|
|
|
|
m4_seealso(DbEnv)
|
|
m4_page_footer
|