pub struct EnvironmentConfig {Show 149 fields
pub home: PathBuf,
pub allow_create: bool,
pub transactional: bool,
pub read_only: bool,
pub env_is_locking: bool,
pub shared_cache: bool,
pub env_recovery_force_checkpoint: bool,
pub env_recovery_force_new_file: bool,
pub halt_on_commit_after_checksum_exception: bool,
pub logging_level: Option<String>,
pub cache_size: u64,
pub cache_percent: u32,
pub max_off_heap_memory: u64,
pub max_disk: u64,
pub free_disk: u64,
pub run_in_compressor: bool,
pub run_checkpointer: bool,
pub run_cleaner: bool,
pub run_evictor: bool,
pub run_offheap_evictor: bool,
pub run_verifier: bool,
pub env_background_read_limit_kb: u32,
pub env_background_write_limit_kb: u32,
pub env_background_sleep_interval_us: u64,
pub env_check_leaks: bool,
pub env_forced_yield: bool,
pub env_fair_latches: bool,
pub env_latch_timeout_ms: u64,
pub env_ttl_clock_tolerance_ms: u64,
pub env_expiration_enabled: bool,
pub env_db_eviction: bool,
pub env_dup_convert_preload_all: bool,
pub adler32_chunk_size: usize,
pub log_file_max_bytes: u64,
pub log_file_cache_size: usize,
pub log_checksum_read: bool,
pub log_verify_checksums: bool,
pub log_fsync_timeout_ms: u64,
pub log_fsync_time_limit_ms: u64,
pub log_num_buffers: usize,
pub log_total_buffer_bytes: u64,
pub log_buffer_size: usize,
pub log_fault_read_size: usize,
pub log_iterator_read_size: usize,
pub log_iterator_max_size: usize,
pub log_n_data_directories: u32,
pub log_mem_only: bool,
pub log_detect_file_delete: bool,
pub log_detect_file_delete_interval_ms: u64,
pub log_flush_sync_interval_ms: u64,
pub log_flush_no_sync_interval_ms: u64,
pub log_use_odsync: bool,
pub log_use_write_queue: bool,
pub log_write_queue_size: usize,
pub log_group_commit_threshold: usize,
pub log_group_commit_interval_ms: u64,
pub node_max_entries: u32,
pub node_dup_tree_max_entries: u32,
pub tree_max_embedded_ln: u32,
pub tree_max_delta: u8,
pub tree_bin_delta: bool,
pub tree_min_memory: u64,
pub tree_compact_max_key_length: u32,
pub in_compressor_wakeup_interval_ms: u64,
pub compressor_deadlock_retry: u32,
pub compressor_lock_timeout_ms: u64,
pub compressor_purge_root: bool,
pub cleaner_min_utilization: u8,
pub cleaner_min_file_utilization: u8,
pub cleaner_threads: u32,
pub cleaner_min_file_count: u32,
pub cleaner_min_age: u32,
pub cleaner_bytes_interval: u64,
pub cleaner_wakeup_interval_ms: u64,
pub cleaner_fetch_obsolete_size: bool,
pub cleaner_adjust_utilization: bool,
pub cleaner_deadlock_retry: u32,
pub cleaner_lock_timeout_ms: u64,
pub cleaner_expunge: bool,
pub cleaner_use_deleted_dir: bool,
pub cleaner_max_batch_files: u32,
pub cleaner_read_size: usize,
pub cleaner_detail_max_memory_percentage: u32,
pub cleaner_look_ahead_cache_size: usize,
pub cleaner_foreground_proactive_migration: bool,
pub cleaner_background_proactive_migration: bool,
pub cleaner_lazy_migration: bool,
pub cleaner_expiration_enabled: bool,
pub checkpointer_bytes_interval: u64,
pub checkpointer_wakeup_interval_ms: u64,
pub checkpointer_min_interval_secs: u64,
pub checkpointer_deadlock_retry: u32,
pub checkpointer_high_priority: bool,
pub evictor_nodes_per_scan: usize,
pub evictor_evict_bytes: u64,
pub evictor_critical_percentage: u32,
pub evictor_lru_only: bool,
pub evictor_n_lru_lists: u32,
pub evictor_deadlock_retry: u32,
pub evictor_core_threads: usize,
pub evictor_max_threads: usize,
pub evictor_keep_alive_ms: u64,
pub evictor_allow_bin_deltas: bool,
pub offheap_evict_bytes: u64,
pub offheap_n_lru_lists: u32,
pub offheap_checksum: bool,
pub offheap_core_threads: usize,
pub offheap_max_threads: usize,
pub offheap_keep_alive_ms: u64,
pub lock_timeout_ms: u64,
pub lock_n_lock_tables: u32,
pub lock_deadlock_detect: bool,
pub lock_deadlock_detect_delay_ms: u64,
pub txn_timeout_ms: u64,
pub durability: Durability,
pub txn_no_sync: bool,
pub txn_write_no_sync: bool,
pub txn_serializable_isolation: bool,
pub txn_deadlock_stack_trace: bool,
pub txn_dump_locks: bool,
pub verify_schedule: String,
pub verify_log: bool,
pub verify_log_read_delay_ms: u64,
pub verify_btree: bool,
pub verify_secondaries: bool,
pub verify_data_records: bool,
pub verify_obsolete_records: bool,
pub verify_btree_batch_size: u32,
pub verify_btree_batch_delay_ms: u64,
pub dos_producer_queue_timeout_ms: u64,
pub stats_collect: bool,
pub stats_collect_interval_secs: u64,
pub stats_max_files: u32,
pub stats_file_row_count: u32,
pub stats_file_directory: Option<PathBuf>,
pub trace_file: bool,
pub trace_console: bool,
pub trace_db: bool,
pub trace_file_limit_bytes: u64,
pub trace_file_count: u32,
pub trace_level: Option<String>,
pub console_logging_level: Option<String>,
pub file_logging_level: Option<String>,
pub trace_level_lock_manager: Option<String>,
pub trace_level_recovery: Option<String>,
pub trace_level_evictor: Option<String>,
pub trace_level_cleaner: Option<String>,
pub startup_dump_threshold_ms: u64,
pub exception_listener: ExceptionListenerHolder,
}Expand description
Configuration for opening a Noxu DB environment.
Configuration for a Noxu DB environment. Provides 150+ typed parameters for tuning all subsystems.
Use the builder pattern (set_* / with_*) to configure individual
parameters; all fields have -identical defaults unless noted.
Fieldsยง
ยงhome: PathBufHome directory for the environment.
allow_create: boolAllow creation of a new environment if it does not exist.
Mirrors EnvironmentConfig.setAllowCreate() / default false.
transactional: boolOpen the environment for transactional use.
Mirrors ENV_IS_TRANSACTIONAL / default false.
read_only: boolOpen the environment in read-only mode.
Mirrors ENV_READ_ONLY / default false.
env_is_locking: boolEnable locking. When false the environment runs without a lock
manager (equivalent to-transactional, non-locking mode).
Mirrors ENV_IS_LOCKING / default true.
Share the B-tree cache across multiple environments in the same JVM.
In Noxu, this is a configuration hint; shared-cache pooling is
accepted as a future work item.
Mirrors SHARED_CACHE / default false.
env_recovery_force_checkpoint: boolForce a checkpoint after recovery completes.
Mirrors ENV_RECOVERY_FORCE_CHECKPOINT / default false.
env_recovery_force_new_file: boolForce a new log file to be started after recovery.
Mirrors ENV_RECOVERY_FORCE_NEW_FILE / default false.
halt_on_commit_after_checksum_exception: boolHalt the environment on commit after a ChecksumException.
Mirrors HALT_ON_COMMIT_AFTER_CHECKSUMEXCEPTION / default false.
logging_level: Option<String>Logging level for this environment (uses Rust log crate levels:
"ERROR", "WARN", "INFO", "DEBUG", "TRACE").
: maps to java.util.logging.level / default "INFO".
cache_size: u64Maximum bytes for the B-tree cache.
Mirrors MAX_MEMORY / EnvironmentConfig.setCacheSize() / default 0
( auto-sizes to 60% of heap). Noxu default: 64 MiB.
cache_percent: u32Cache size as a percentage of system memory (0 = use cache_size).
Mirrors MAX_MEMORY_PERCENT / EnvironmentConfig.setCachePercent() /
default 60. When non-zero, overrides cache_size.
max_off_heap_memory: u64Off-heap cache size in bytes. 0 = disabled.
Mirrors MAX_OFF_HEAP_MEMORY / default 0.
max_disk: u64Maximum disk space the environment may use in bytes. 0 = unlimited.
Mirrors MAX_DISK / default 0.
free_disk: u64Minimum free disk space in bytes; triggers DiskLimitExceeded if the
available space on the file-system falls below this threshold.
Mirrors FREE_DISK / default 5 GiB.
run_in_compressor: boolRun the background INCompressor daemon.
Mirrors ENV_RUN_IN_COMPRESSOR / default true.
run_checkpointer: boolRun the background Checkpointer daemon.
Mirrors ENV_RUN_CHECKPOINTER / default true.
run_cleaner: boolRun the background Cleaner daemon.
Mirrors ENV_RUN_CLEANER / default true.
run_evictor: boolRun the background Evictor daemon.
Mirrors ENV_RUN_EVICTOR / default true.
run_offheap_evictor: boolRun the background off-heap Evictor daemon.
Mirrors ENV_RUN_OFFHEAP_EVICTOR / default true (when off-heap configured).
run_verifier: boolRun the background data-integrity Verifier daemon.
Mirrors ENV_RUN_VERIFIER / default false.
env_background_read_limit_kb: u32Maximum read throughput for background daemons in KB/s. 0 = unlimited.
Mirrors ENV_BACKGROUND_READ_LIMIT / default 0.
env_background_write_limit_kb: u32Maximum write throughput for background daemons in KB/s. 0 = unlimited.
Mirrors ENV_BACKGROUND_WRITE_LIMIT / default 0.
env_background_sleep_interval_us: u64Sleep interval for background daemons between work units in
microseconds. 0 = no enforced sleep.
Mirrors ENV_BACKGROUND_SLEEP_INTERVAL / default 0.
env_check_leaks: boolCheck for lock leaks when databases are closed.
Reserved / not yet implemented as of v3.1. Setting a non-default
value (false) has no effect and emits a WARN log at
Environment::open time.
Mirrors ENV_CHECK_LEAKS / default true.
env_forced_yield: boolForce thread yields in critical sections (useful for testing fairness).
Reserved / not yet implemented as of v3.1. Setting a non-default
value (true) has no effect and emits a WARN log at
Environment::open time.
Mirrors ENV_FORCED_YIELD / default false.
env_fair_latches: boolUse fair (FIFO-ordered) latches. May reduce throughput under low contention but prevents starvation.
Reserved / not yet implemented as of v3.1. Setting a non-default
value (true) has no effect and emits a WARN log at
Environment::open time.
Mirrors ENV_FAIR_LATCHES / default false.
env_latch_timeout_ms: u64Latch acquisition timeout in milliseconds. 0 = no timeout (block
indefinitely). In JE, a timeout causes EnvironmentFailure.
Reserved / not yet implemented as of v3.1. Setting a non-default
value (non-zero) has no effect and emits a WARN log at
Environment::open time. The latch layer always blocks indefinitely.
Mirrors ENV_LATCH_TIMEOUT / default 300_000 ms (5 min).
env_ttl_clock_tolerance_ms: u64TTL clock tolerance โ records within this many milliseconds of their expiration time are treated as expired.
Reserved / not yet implemented as of v3.1. Setting a non-default
value (non-zero) has no effect and emits a WARN log at
Environment::open time.
Mirrors ENV_TTL_CLOCK_TOLERANCE / default 0.
env_expiration_enabled: boolEnable TTL-based record expiration at the environment level.
Reserved / not yet implemented as of v3.1. Setting a non-default
value (true) has no effect and emits a WARN log at
Environment::open time.
Mirrors ENV_EXPIRATION_ENABLED / default false.
env_db_eviction: boolEnable per-database node eviction.
Reserved / not yet implemented as of v3.1. Setting a non-default
value (true) has no effect and emits a WARN log at
Environment::open time.
Mirrors ENV_DB_EVICTION / default false.
env_dup_convert_preload_all: boolPreload all duplicate-tree data before converting dup databases.
Mirrors ENV_DUP_CONVERT_PRELOAD_ALL / default true.
adler32_chunk_size: usizeChunk size (bytes) for Adler32 checksums. 0 = disabled (use CRC32).
Mirrors ADLER32_CHUNK_SIZE / default 0.
log_file_max_bytes: u64Maximum size of a single log file in bytes.
Mirrors LOG_FILE_MAX / default 10 MiB.
log_file_cache_size: usizeNumber of cached open file handles (LRU-evicted when full).
Mirrors LOG_FILE_CACHE_SIZE / default 100.
log_checksum_read: boolValidate entry checksums on every log read.
Mirrors LOG_CHECKSUM_READ / default true.
log_verify_checksums: boolVerify all checksums during log scans (more thorough than
log_checksum_read; used by background verifier).
Mirrors LOG_VERIFY_CHECKSUMS / default false.
log_fsync_timeout_ms: u64Timeout for a single fdatasync call in milliseconds.
Mirrors LOG_FSYNC_TIMEOUT / default 500_000 ms.
log_fsync_time_limit_ms: u64Soft limit on fsync duration in milliseconds; logs a warning when
exceeded. 0 = disabled.
Mirrors LOG_FSYNC_TIME_LIMIT / default 0.
log_num_buffers: usizeNumber of write buffers in the log buffer pool.
Mirrors LOG_NUM_BUFFERS / default 3.
log_total_buffer_bytes: u64Total bytes across all log write buffers.
Mirrors LOG_TOTAL_BUFFER_BYTES / default 7 MiB.
log_buffer_size: usizePer-buffer size override in bytes. 0 = derive from
log_total_buffer_bytes / log_num_buffers.
Mirrors LOG_BUFFER_SIZE / default 0.
log_fault_read_size: usizeSize of the fault-in read buffer for random BIN fetches.
Mirrors LOG_FAULT_READ_SIZE / default 2 KiB.
log_iterator_read_size: usizeLog iterator read buffer in bytes.
Mirrors LOG_ITERATOR_READ_SIZE / default 8 KiB.
log_iterator_max_size: usizeLog iterator maximum buffer size in bytes (grows up to this limit).
Mirrors LOG_ITERATOR_MAX_SIZE / default 16 MiB.
log_n_data_directories: u32Number of data directories for log file striping. 0 = single dir.
Mirrors LOG_N_DATA_DIRECTORIES / default 0.
log_mem_only: boolRun in in-memory-only mode (no log files written).
Mirrors LOG_MEM_ONLY / default false.
log_detect_file_delete: boolDetect external deletion of log files and respond gracefully.
Mirrors LOG_DETECT_FILE_DELETE / default false.
log_detect_file_delete_interval_ms: u64Interval between log-file deletion detection polls in milliseconds.
Mirrors LOG_DETECT_FILE_DELETE_INTERVAL / default 3_000 ms.
log_flush_sync_interval_ms: u64Interval between periodic flush-and-sync operations in milliseconds.
0 = disabled. : LOG_FLUSH_SYNC_INTERVAL / default 0.
log_flush_no_sync_interval_ms: u64Interval between periodic flush-without-sync operations in
milliseconds. 0 = disabled.
Mirrors LOG_FLUSH_NO_SYNC_INTERVAL / default 0.
log_use_odsync: boolUse O_DSYNC when opening log files. Accepted deviation: on Linux
Noxu passes O_DSYNC to OpenOptions; semantics are equivalent.
Mirrors LOG_USE_ODSYNC / default false.
log_use_write_queue: boolUse an asynchronous write queue between the log manager and the OS.
Mirrors LOG_USE_WRITE_QUEUE / default false.
log_write_queue_size: usizeSize of the asynchronous write queue in bytes.
Mirrors LOG_WRITE_QUEUE_SIZE / default 1 MiB.
log_group_commit_threshold: usizeGroup-commit waiter threshold. 0 = disabled.
Mirrors LOG_GROUP_COMMIT_THRESHOLD / default 0.
log_group_commit_interval_ms: u64Group-commit interval in milliseconds. 0 = disabled.
Mirrors LOG_GROUP_COMMIT_INTERVAL / default 0.
node_max_entries: u32Maximum number of entries per Internal Node (IN).
Mirrors NODE_MAX_ENTRIES / default 128.
node_dup_tree_max_entries: u32Maximum number of entries per duplicate-tree node.
Mirrors NODE_DUP_TREE_MAX_ENTRIES / default 128.
tree_max_embedded_ln: u32Maximum value size in bytes for inline (embedded) LNs stored directly
in the BIN slot. Records larger than this are stored as separate LNs.
Mirrors TREE_MAX_EMBEDDED_LN / default 16.
tree_max_delta: u8Maximum percentage of BIN entries that may be in a delta before a
full BIN is written (0โ100).
Mirrors TREE_MAX_DELTA / default 25.
tree_bin_delta: boolWrite BIN-delta log entries (partial BIN updates).
Mirrors TREE_BIN_DELTA / default true.
tree_min_memory: u64Minimum memory per B-tree node in bytes. 0 = no minimum.
Mirrors TREE_MIN_MEMORY / default 0.
tree_compact_max_key_length: u32Maximum key length for compact (prefix-compressed) key storage.
Mirrors TREE_COMPACT_MAX_KEY_LENGTH / default 16.
in_compressor_wakeup_interval_ms: u64INCompressor wakeup interval in milliseconds.
Mirrors COMPRESSOR_WAKEUP_INTERVAL / default 5_000 ms.
compressor_deadlock_retry: u32Number of deadlock retries per INCompressor pass.
Mirrors COMPRESSOR_DEADLOCK_RETRY / default 3.
compressor_lock_timeout_ms: u64Lock timeout for INCompressor operations in milliseconds.
Mirrors COMPRESSOR_LOCK_TIMEOUT / default 500 ms.
compressor_purge_root: boolPurge the root IN when it becomes empty after compression.
Mirrors COMPRESSOR_PURGE_ROOT / default false.
cleaner_min_utilization: u8Minimum log utilization percentage; cleaning triggers when below this.
Mirrors CLEANER_MIN_UTILIZATION / default 50.
cleaner_min_file_utilization: u8Minimum per-file utilization; files below this are always candidates.
Mirrors CLEANER_MIN_FILE_UTILIZATION / default 5.
cleaner_threads: u32Number of background cleaner threads.
Mirrors CLEANER_THREADS / default 1.
cleaner_min_file_count: u32Minimum number of log files that must exist before cleaning begins.
Mirrors CLEANER_MIN_FILES_TO_CLEAN / default 2.
cleaner_min_age: u32Minimum age of a log file (in checkpoints) before it becomes a
candidate. : CLEANER_MIN_AGE / default 2.
cleaner_bytes_interval: u64Bytes written between cleaner wakeups (byte-based trigger).
0 = disabled. : CLEANER_BYTES_INTERVAL / default 0.
cleaner_wakeup_interval_ms: u64Time between cleaner wakeups in milliseconds (time-based trigger).
0 = disabled. : CLEANER_WAKEUP_INTERVAL / default 0.
cleaner_fetch_obsolete_size: boolFetch the sizes of obsolete records when calculating utilization.
Mirrors CLEANER_FETCH_OBSOLETE_SIZE / default false.
cleaner_adjust_utilization: boolAdjust utilization accounting for uncommitted transactions.
Mirrors CLEANER_ADJUST_UTILIZATION / default false.
cleaner_deadlock_retry: u32Number of deadlock retries per cleaner migration pass.
Mirrors CLEANER_DEADLOCK_RETRY / default 3.
cleaner_lock_timeout_ms: u64Lock timeout for cleaner migration operations in milliseconds.
Mirrors CLEANER_LOCK_TIMEOUT / default 500 ms.
cleaner_expunge: boolExpunge (delete) cleaned log files immediately rather than keeping them
in a deleted/ sub-directory.
Mirrors CLEANER_EXPUNGE / default true.
cleaner_use_deleted_dir: boolMove cleaned log files to a deleted/ sub-directory instead of
deleting them in place.
Mirrors CLEANER_USE_DELETED_DIR / default false.
cleaner_max_batch_files: u32Maximum number of log files processed per cleaner batch.
0 = unlimited. : CLEANER_MAX_BATCH_FILES / default 0.
cleaner_read_size: usizeBytes read per cleaner file scan pass.
Mirrors CLEANER_READ_SIZE / default 8 KiB.
cleaner_detail_max_memory_percentage: u32Maximum percentage of the cache to use for cleaner utilization detail.
Mirrors CLEANER_DETAIL_MAX_MEMORY_PERCENTAGE / default 2.
cleaner_look_ahead_cache_size: usizeNumber of LN records to look ahead during file cleaning.
Mirrors CLEANER_LOOK_AHEAD_CACHE_SIZE / default 32.
cleaner_foreground_proactive_migration: boolMigrate live records proactively in the foreground (user threads).
Mirrors CLEANER_FOREGROUND_PROACTIVE_MIGRATION / default false.
cleaner_background_proactive_migration: boolMigrate live records proactively in the background cleaner thread.
Mirrors CLEANER_BACKGROUND_PROACTIVE_MIGRATION / default false.
cleaner_lazy_migration: boolLazy migration: defer LN migration until the slot is next accessed.
Mirrors CLEANER_LAZY_MIGRATION / default false.
cleaner_expiration_enabled: boolEnable TTL-based record expiration tracking in the cleaner.
Mirrors CLEANER_EXPIRATION_ENABLED / default false.
checkpointer_bytes_interval: u64Number of bytes written between automatic checkpoints.
Mirrors CHECKPOINTER_BYTES_INTERVAL / default 20 MiB.
checkpointer_wakeup_interval_ms: u64Time between automatic checkpoints in milliseconds.
0 = disabled. : CHECKPOINTER_WAKEUP_INTERVAL / default 30_000 ms.
checkpointer_min_interval_secs: u64Minimum time between automatic checkpoints in seconds (0 = disabled).
: relates to CHECKPOINTER_HIGH_PRIORITY.
checkpointer_deadlock_retry: u32Number of deadlock retries per checkpoint.
Mirrors CHECKPOINTER_DEADLOCK_RETRY / default 3.
checkpointer_high_priority: boolRun checkpoints at high priority (flush more aggressively).
Mirrors CHECKPOINTER_HIGH_PRIORITY / default false.
evictor_nodes_per_scan: usizeNumber of tree nodes examined per evictor pass.
Mirrors EVICTOR_NODES_PER_SCAN / default 10.
evictor_evict_bytes: u64Bytes to evict from the cache per evictor pass.
Mirrors EVICTOR_EVICT_BYTES / default 512 KiB.
evictor_critical_percentage: u32Percentage above the cache target at which critical eviction kicks in.
Mirrors EVICTOR_CRITICAL_PERCENTAGE / default 5.
evictor_lru_only: boolUse LRU-only eviction (no priority-1 / priority-2 split).
Mirrors EVICTOR_LRU_ONLY / default false.
evictor_n_lru_lists: u32Number of LRU lists (increases parallelism under contention).
Mirrors EVICTOR_N_LRU_LISTS / default 4.
evictor_deadlock_retry: u32Number of deadlock retries per evictor pass.
Mirrors EVICTOR_DEADLOCK_RETRY / default 3.
evictor_core_threads: usizeMinimum number of background evictor threads always kept alive.
Mirrors EVICTOR_CORE_THREADS / default 1.
evictor_max_threads: usizeMaximum number of background evictor threads.
Mirrors EVICTOR_MAX_THREADS / default 10.
evictor_keep_alive_ms: u64Keep-alive time for idle evictor threads in milliseconds.
Mirrors EVICTOR_KEEP_ALIVE / default 60_000 ms.
evictor_allow_bin_deltas: boolAllow the evictor to write BIN-delta entries rather than full BINs.
Mirrors EVICTOR_ALLOW_BIN_DELTAS / default true.
offheap_evict_bytes: u64Bytes to evict from the off-heap cache per pass.
Mirrors OFFHEAP_EVICT_BYTES / default 512 KiB.
offheap_n_lru_lists: u32Number of LRU lists for the off-heap cache.
Mirrors OFFHEAP_N_LRU_LISTS / default 4.
offheap_checksum: boolChecksum off-heap cache entries on write and verify on read.
Mirrors OFFHEAP_CHECKSUM / default false.
offheap_core_threads: usizeMinimum number of off-heap evictor threads always kept alive.
Mirrors OFFHEAP_CORE_THREADS / default 1.
offheap_max_threads: usizeMaximum number of off-heap evictor threads.
Mirrors OFFHEAP_MAX_THREADS / default 10.
offheap_keep_alive_ms: u64Keep-alive time for idle off-heap evictor threads in milliseconds.
Mirrors OFFHEAP_KEEP_ALIVE / default 60_000 ms.
lock_timeout_ms: u64Lock timeout in milliseconds.
Mirrors LOCK_TIMEOUT / default 500 ms.
lock_n_lock_tables: u32Number of lock table shards.
Mirrors LOCK_N_LOCK_TABLES / default 1. Noxu default: 16.
lock_deadlock_detect: boolRun the deadlock detector on lock waits.
Mirrors LOCK_DEADLOCK_DETECT / default true.
lock_deadlock_detect_delay_ms: u64Delay before deadlock detection runs (milliseconds).
0 = detect immediately on every wait.
Mirrors LOCK_DEADLOCK_DETECT_DELAY / default 0.
txn_timeout_ms: u64Transaction timeout in milliseconds. 0 = no timeout.
Mirrors TXN_TIMEOUT / default 0.
durability: DurabilityDefault durability policy for transactions.
Mirrors TXN_DURABILITY.
txn_no_sync: boolCommits do not wait for the log to reach disk.
Mirrors TXN_NO_SYNC / default false.
Deprecated since 2.4.1 โ use the durability
field with Durability::commit_no_sync() instead.
txn_write_no_sync: boolCommits write the log to the OS buffer but skip fdatasync.
Mirrors TXN_WRITE_NO_SYNC / default false.
Deprecated since 2.4.1 โ use the durability
field with Durability::commit_write_no_sync() instead.
txn_serializable_isolation: boolWhen true, all transactions default to serializable
(degree-3) isolation: read locks are retained through commit.
When false (the default), transactions use
repeatable-read isolation โ read locks are still held for
the lifetime of the txn but predicate / phantom protection is
not provided. Per-transaction overrides are available via
crate::transaction_config::TransactionConfig::set_serializable_isolation
and crate::transaction_config::TransactionConfig::set_read_committed.
Mirrors TXN_SERIALIZABLE_ISOLATION / default false.
txn_deadlock_stack_trace: boolCapture a stack trace at deadlock detection time (expensive).
Mirrors TXN_DEADLOCK_STACK_TRACE / default false.
txn_dump_locks: boolDump all lock state on deadlock detection (diagnostic, expensive).
Mirrors TXN_DUMP_LOCKS / default false.
verify_schedule: StringCron-style schedule string for the background verifier.
Empty string = run continuously when run_verifier = true.
Mirrors VERIFY_SCHEDULE / default "".
verify_log: boolVerify log-file checksums in the background.
Mirrors VERIFY_LOG / default false.
verify_log_read_delay_ms: u64Delay between log verification read operations in milliseconds.
Mirrors VERIFY_LOG_READ_DELAY / default 0.
verify_btree: boolVerify the B-tree structure in the background.
Mirrors VERIFY_BTREE / default false.
verify_secondaries: boolVerify secondary index consistency in the background.
Mirrors VERIFY_SECONDARIES / default true.
verify_data_records: boolVerify data records (values) in the background.
Mirrors VERIFY_DATA_RECORDS / default false.
verify_obsolete_records: boolVerify obsolete records have correct LSNs in the background.
Mirrors VERIFY_OBSOLETE_RECORDS / default false.
verify_btree_batch_size: u32Number of B-tree nodes verified per verifier batch.
Mirrors VERIFY_BTREE_BATCH_SIZE / default 1_000.
verify_btree_batch_delay_ms: u64Delay between B-tree verification batches in milliseconds.
Mirrors VERIFY_BTREE_BATCH_DELAY / default 10 ms.
dos_producer_queue_timeout_ms: u64Timeout for the disk-ordered cursor producer queue in milliseconds.
Mirrors DOS_PRODUCER_QUEUE_TIMEOUT / default 10_000 ms.
stats_collect: boolForce a checkpoint after recovery completes (alias; see
env_recovery_force_checkpoint above).
Collect environment statistics in the background.
Mirrors STATS_COLLECT / default false.
stats_collect_interval_secs: u64Interval between background stats collection passes in seconds.
Mirrors STATS_COLLECT_INTERVAL / default 300 s.
stats_max_files: u32Maximum number of stats CSV files to retain.
Mirrors STATS_MAX_FILES / default 100.
stats_file_row_count: u32Rows per stats CSV file before rotation.
Mirrors STATS_FILE_ROW_COUNT / default 1_000.
stats_file_directory: Option<PathBuf>Directory for stats CSV files. None = use the environment home.
Mirrors STATS_FILE_DIRECTORY / default None.
trace_file: boolEnable log-file-based tracing (uses env home as destination).
Mirrors TRACE_FILE / default false.
trace_console: boolEnable console (stderr) tracing.
Mirrors TRACE_CONSOLE / default false.
trace_db: boolEnable database-record-based tracing (internal trace DB).
Mirrors TRACE_DB / default false.
trace_file_limit_bytes: u64Maximum size of each trace log file in bytes.
Mirrors TRACE_FILE_LIMIT / default 10 MiB.
trace_file_count: u32Number of rotating trace log files.
Mirrors TRACE_FILE_COUNT / default 10.
trace_level: Option<String>Overall logging level (e.g. "INFO", "DEBUG").
Mirrors TRACE_LEVEL / default "INFO".
console_logging_level: Option<String>Console-handler logging level.
Mirrors CONSOLE_LOGGING_LEVEL / default "SEVERE".
file_logging_level: Option<String>File-handler logging level.
Mirrors FILE_LOGGING_LEVEL / default "INFO".
trace_level_lock_manager: Option<String>Lock-manager subsystem trace level.
Mirrors TRACE_LEVEL_LOCK_MANAGER / default "FINE".
trace_level_recovery: Option<String>Recovery subsystem trace level.
Mirrors TRACE_LEVEL_RECOVERY / default "FINE".
trace_level_evictor: Option<String>Evictor subsystem trace level.
Mirrors TRACE_LEVEL_EVICTOR / default "FINE".
trace_level_cleaner: Option<String>Cleaner subsystem trace level.
Mirrors TRACE_LEVEL_CLEANER / default "FINE".
startup_dump_threshold_ms: u64Startup statistics dump threshold in milliseconds. Dump stats if
startup takes longer than this. 0 = disabled.
Mirrors STARTUP_DUMP_THRESHOLD / default 0.
exception_listener: ExceptionListenerHolderOptional callback invoked when a background daemon thread encounters an exception. Set this to receive notifications from the Checkpointer, Cleaner, Evictor, INCompressor, and Verifier daemons.
Mirrors EnvironmentConfig.setExceptionListener(ExceptionListener).
Implementationsยง
Sourceยงimpl EnvironmentConfig
impl EnvironmentConfig
Sourcepub fn new(home: PathBuf) -> Self
pub fn new(home: PathBuf) -> Self
Creates a new EnvironmentConfig with the given home directory and
-identical defaults for all parameters.
pub fn set_allow_create(&mut self, v: bool) -> &mut Self
pub fn with_allow_create(self, v: bool) -> Self
pub fn set_transactional(&mut self, v: bool) -> &mut Self
pub fn with_transactional(self, v: bool) -> Self
pub fn set_read_only(&mut self, v: bool) -> &mut Self
pub fn with_read_only(self, v: bool) -> Self
pub fn set_env_is_locking(&mut self, v: bool) -> &mut Self
pub fn set_env_recovery_force_checkpoint(&mut self, v: bool) -> &mut Self
pub fn set_env_recovery_force_new_file(&mut self, v: bool) -> &mut Self
pub fn set_halt_on_commit_after_checksum_exception( &mut self, v: bool, ) -> &mut Self
pub fn set_logging_level(&mut self, level: String) -> &mut Self
pub fn set_cache_size(&mut self, bytes: u64) -> &mut Self
pub fn with_cache_size(self, bytes: u64) -> Self
pub fn set_cache_percent(&mut self, pct: u32) -> &mut Self
pub fn set_max_off_heap_memory(&mut self, bytes: u64) -> &mut Self
pub fn set_max_disk(&mut self, bytes: u64) -> &mut Self
pub fn set_free_disk(&mut self, bytes: u64) -> &mut Self
pub fn set_run_in_compressor(&mut self, v: bool) -> &mut Self
pub fn set_run_checkpointer(&mut self, v: bool) -> &mut Self
pub fn set_run_cleaner(&mut self, v: bool) -> &mut Self
pub fn set_run_evictor(&mut self, v: bool) -> &mut Self
pub fn set_run_offheap_evictor(&mut self, v: bool) -> &mut Self
pub fn set_run_verifier(&mut self, v: bool) -> &mut Self
pub fn set_env_background_read_limit_kb(&mut self, kb: u32) -> &mut Self
pub fn set_env_background_write_limit_kb(&mut self, kb: u32) -> &mut Self
pub fn set_env_background_sleep_interval_us(&mut self, us: u64) -> &mut Self
pub fn set_env_check_leaks(&mut self, v: bool) -> &mut Self
pub fn set_env_forced_yield(&mut self, v: bool) -> &mut Self
pub fn set_env_fair_latches(&mut self, v: bool) -> &mut Self
pub fn set_env_latch_timeout_ms(&mut self, ms: u64) -> &mut Self
pub fn set_env_ttl_clock_tolerance_ms(&mut self, ms: u64) -> &mut Self
pub fn set_env_expiration_enabled(&mut self, v: bool) -> &mut Self
pub fn set_env_db_eviction(&mut self, v: bool) -> &mut Self
pub fn set_adler32_chunk_size(&mut self, bytes: usize) -> &mut Self
pub fn set_log_file_max_bytes(&mut self, bytes: u64) -> &mut Self
pub fn with_log_file_max_bytes(self, bytes: u64) -> Self
pub fn set_log_file_cache_size(&mut self, n: usize) -> &mut Self
pub fn set_log_checksum_read(&mut self, v: bool) -> &mut Self
pub fn set_log_verify_checksums(&mut self, v: bool) -> &mut Self
pub fn set_log_fsync_timeout_ms(&mut self, ms: u64) -> &mut Self
pub fn set_log_fsync_time_limit_ms(&mut self, ms: u64) -> &mut Self
pub fn set_log_num_buffers(&mut self, n: usize) -> &mut Self
pub fn set_log_total_buffer_bytes(&mut self, bytes: u64) -> &mut Self
pub fn set_log_buffer_size(&mut self, bytes: usize) -> &mut Self
pub fn set_log_fault_read_size(&mut self, bytes: usize) -> &mut Self
pub fn set_log_iterator_read_size(&mut self, bytes: usize) -> &mut Self
pub fn set_log_iterator_max_size(&mut self, bytes: usize) -> &mut Self
pub fn set_log_n_data_directories(&mut self, n: u32) -> &mut Self
pub fn set_log_mem_only(&mut self, v: bool) -> &mut Self
pub fn set_log_detect_file_delete(&mut self, v: bool) -> &mut Self
pub fn set_log_detect_file_delete_interval_ms(&mut self, ms: u64) -> &mut Self
pub fn set_log_flush_sync_interval_ms(&mut self, ms: u64) -> &mut Self
pub fn set_log_flush_no_sync_interval_ms(&mut self, ms: u64) -> &mut Self
pub fn set_log_use_odsync(&mut self, v: bool) -> &mut Self
pub fn set_log_use_write_queue(&mut self, v: bool) -> &mut Self
pub fn set_log_write_queue_size(&mut self, bytes: usize) -> &mut Self
pub fn set_log_group_commit_threshold(&mut self, n: usize) -> &mut Self
pub fn set_log_group_commit_interval_ms(&mut self, ms: u64) -> &mut Self
pub fn with_log_group_commit(self, threshold: usize, interval_ms: u64) -> Self
pub fn set_node_max_entries(&mut self, n: u32) -> &mut Self
pub fn set_node_dup_tree_max_entries(&mut self, n: u32) -> &mut Self
pub fn set_tree_max_embedded_ln(&mut self, bytes: u32) -> &mut Self
pub fn set_tree_max_delta(&mut self, pct: u8) -> &mut Self
pub fn set_tree_bin_delta(&mut self, v: bool) -> &mut Self
pub fn set_tree_min_memory(&mut self, bytes: u64) -> &mut Self
pub fn set_tree_compact_max_key_length(&mut self, bytes: u32) -> &mut Self
pub fn set_in_compressor_wakeup_interval_ms(&mut self, ms: u64) -> &mut Self
pub fn set_compressor_deadlock_retry(&mut self, n: u32) -> &mut Self
pub fn set_compressor_lock_timeout_ms(&mut self, ms: u64) -> &mut Self
pub fn set_compressor_purge_root(&mut self, v: bool) -> &mut Self
pub fn set_cleaner_min_utilization(&mut self, pct: u8) -> &mut Self
pub fn with_cleaner_min_utilization(self, pct: u8) -> Self
pub fn set_cleaner_min_file_utilization(&mut self, pct: u8) -> &mut Self
pub fn set_cleaner_threads(&mut self, n: u32) -> &mut Self
pub fn set_cleaner_min_file_count(&mut self, n: u32) -> &mut Self
pub fn set_cleaner_min_age(&mut self, checkpoints: u32) -> &mut Self
pub fn set_cleaner_bytes_interval(&mut self, bytes: u64) -> &mut Self
pub fn set_cleaner_wakeup_interval_ms(&mut self, ms: u64) -> &mut Self
pub fn set_cleaner_fetch_obsolete_size(&mut self, v: bool) -> &mut Self
pub fn set_cleaner_adjust_utilization(&mut self, v: bool) -> &mut Self
pub fn set_cleaner_deadlock_retry(&mut self, n: u32) -> &mut Self
pub fn set_cleaner_lock_timeout_ms(&mut self, ms: u64) -> &mut Self
pub fn set_cleaner_expunge(&mut self, v: bool) -> &mut Self
pub fn set_cleaner_use_deleted_dir(&mut self, v: bool) -> &mut Self
pub fn set_cleaner_max_batch_files(&mut self, n: u32) -> &mut Self
pub fn set_cleaner_read_size(&mut self, bytes: usize) -> &mut Self
pub fn set_cleaner_detail_max_memory_percentage( &mut self, pct: u32, ) -> &mut Self
pub fn set_cleaner_look_ahead_cache_size(&mut self, n: usize) -> &mut Self
pub fn set_cleaner_foreground_proactive_migration( &mut self, v: bool, ) -> &mut Self
pub fn set_cleaner_background_proactive_migration( &mut self, v: bool, ) -> &mut Self
pub fn set_cleaner_lazy_migration(&mut self, v: bool) -> &mut Self
pub fn set_cleaner_expiration_enabled(&mut self, v: bool) -> &mut Self
pub fn set_checkpointer_bytes_interval(&mut self, bytes: u64) -> &mut Self
pub fn with_checkpointer_bytes_interval(self, bytes: u64) -> Self
pub fn set_checkpointer_wakeup_interval_ms(&mut self, ms: u64) -> &mut Self
pub fn set_checkpointer_min_interval_secs(&mut self, secs: u64) -> &mut Self
pub fn set_checkpointer_deadlock_retry(&mut self, n: u32) -> &mut Self
pub fn set_checkpointer_high_priority(&mut self, v: bool) -> &mut Self
pub fn set_evictor_nodes_per_scan(&mut self, n: usize) -> &mut Self
pub fn with_evictor_nodes_per_scan(self, n: usize) -> Self
pub fn set_evictor_evict_bytes(&mut self, bytes: u64) -> &mut Self
pub fn set_evictor_critical_percentage(&mut self, pct: u32) -> &mut Self
pub fn set_evictor_lru_only(&mut self, v: bool) -> &mut Self
pub fn set_evictor_n_lru_lists(&mut self, n: u32) -> &mut Self
pub fn set_evictor_deadlock_retry(&mut self, n: u32) -> &mut Self
pub fn set_evictor_core_threads(&mut self, n: usize) -> &mut Self
pub fn set_evictor_max_threads(&mut self, n: usize) -> &mut Self
pub fn set_evictor_keep_alive_ms(&mut self, ms: u64) -> &mut Self
pub fn set_evictor_allow_bin_deltas(&mut self, v: bool) -> &mut Self
pub fn set_offheap_evict_bytes(&mut self, bytes: u64) -> &mut Self
pub fn set_offheap_n_lru_lists(&mut self, n: u32) -> &mut Self
pub fn set_offheap_checksum(&mut self, v: bool) -> &mut Self
pub fn set_offheap_core_threads(&mut self, n: usize) -> &mut Self
pub fn set_offheap_max_threads(&mut self, n: usize) -> &mut Self
pub fn set_offheap_keep_alive_ms(&mut self, ms: u64) -> &mut Self
pub fn set_lock_timeout(&mut self, ms: u64) -> &mut Self
pub fn set_lock_n_lock_tables(&mut self, n: u32) -> &mut Self
pub fn set_lock_deadlock_detect(&mut self, v: bool) -> &mut Self
pub fn set_lock_deadlock_detect_delay_ms(&mut self, ms: u64) -> &mut Self
pub fn set_txn_timeout(&mut self, ms: u64) -> &mut Self
pub fn set_durability(&mut self, d: Durability) -> &mut Self
pub fn with_durability(self, d: Durability) -> Self
Sourcepub fn set_txn_no_sync(&mut self, v: bool) -> &mut Self
๐Deprecated since 2.4.1: use set_durability(Durability::commit_no_sync()) instead
pub fn set_txn_no_sync(&mut self, v: bool) -> &mut Self
use set_durability(Durability::commit_no_sync()) instead
Sets txn_no_sync.
Deprecated โ use set_durability /
with_durability instead.
Sourcepub fn with_txn_no_sync(self, v: bool) -> Self
๐Deprecated since 2.4.1: use with_durability(Durability::commit_no_sync()) instead
pub fn with_txn_no_sync(self, v: bool) -> Self
use with_durability(Durability::commit_no_sync()) instead
Builder-style txn_no_sync.
Deprecated โ use with_durability instead.
Sourcepub fn set_txn_write_no_sync(&mut self, v: bool) -> &mut Self
๐Deprecated since 2.4.1: use set_durability(Durability::commit_write_no_sync()) instead
pub fn set_txn_write_no_sync(&mut self, v: bool) -> &mut Self
use set_durability(Durability::commit_write_no_sync()) instead
Sets txn_write_no_sync.
Deprecated โ use set_durability instead.
pub fn set_txn_serializable_isolation(&mut self, v: bool) -> &mut Self
pub fn set_txn_deadlock_stack_trace(&mut self, v: bool) -> &mut Self
pub fn set_txn_dump_locks(&mut self, v: bool) -> &mut Self
pub fn set_verify_schedule(&mut self, s: String) -> &mut Self
pub fn set_verify_log(&mut self, v: bool) -> &mut Self
pub fn set_verify_log_read_delay_ms(&mut self, ms: u64) -> &mut Self
pub fn set_verify_btree(&mut self, v: bool) -> &mut Self
pub fn set_verify_secondaries(&mut self, v: bool) -> &mut Self
pub fn set_verify_data_records(&mut self, v: bool) -> &mut Self
pub fn set_verify_obsolete_records(&mut self, v: bool) -> &mut Self
pub fn set_verify_btree_batch_size(&mut self, n: u32) -> &mut Self
pub fn set_verify_btree_batch_delay_ms(&mut self, ms: u64) -> &mut Self
pub fn set_dos_producer_queue_timeout_ms(&mut self, ms: u64) -> &mut Self
pub fn set_stats_collect(&mut self, v: bool) -> &mut Self
pub fn set_stats_collect_interval_secs(&mut self, secs: u64) -> &mut Self
pub fn set_stats_max_files(&mut self, n: u32) -> &mut Self
pub fn set_stats_file_row_count(&mut self, n: u32) -> &mut Self
pub fn set_stats_file_directory(&mut self, dir: PathBuf) -> &mut Self
pub fn set_trace_file(&mut self, v: bool) -> &mut Self
pub fn set_trace_console(&mut self, v: bool) -> &mut Self
pub fn set_trace_db(&mut self, v: bool) -> &mut Self
pub fn set_trace_file_limit_bytes(&mut self, bytes: u64) -> &mut Self
pub fn set_trace_file_count(&mut self, n: u32) -> &mut Self
pub fn set_trace_level(&mut self, level: String) -> &mut Self
pub fn set_console_logging_level(&mut self, level: String) -> &mut Self
pub fn set_file_logging_level(&mut self, level: String) -> &mut Self
pub fn set_trace_level_lock_manager(&mut self, level: String) -> &mut Self
pub fn set_trace_level_recovery(&mut self, level: String) -> &mut Self
pub fn set_trace_level_evictor(&mut self, level: String) -> &mut Self
pub fn set_trace_level_cleaner(&mut self, level: String) -> &mut Self
pub fn set_startup_dump_threshold_ms(&mut self, ms: u64) -> &mut Self
Sourcepub fn set_exception_listener(
&mut self,
listener: Arc<dyn ExceptionListener>,
) -> &mut Self
pub fn set_exception_listener( &mut self, listener: Arc<dyn ExceptionListener>, ) -> &mut Self
Registers a callback to be invoked when a background daemon thread encounters an unhandled exception.
Mirrors EnvironmentConfig.setExceptionListener(ExceptionListener).
Sourcepub fn get_exception_listener(&self) -> Option<Arc<dyn ExceptionListener>>
pub fn get_exception_listener(&self) -> Option<Arc<dyn ExceptionListener>>
Returns the registered ExceptionListener, if any.
Trait Implementationsยง
Sourceยงimpl Clone for EnvironmentConfig
impl Clone for EnvironmentConfig
Sourceยงfn clone(&self) -> EnvironmentConfig
fn clone(&self) -> EnvironmentConfig
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more