Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/storage/libmdbx-rs/mdbx-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ fn generate_bindings(mdbx: &Path, out_file: &Path) {
let bindings = bindgen::Builder::default()
.header(mdbx.join("mdbx.h").to_string_lossy())
.allowlist_var("^(MDBX|mdbx)_.*")
.blocklist_item("MDBX_NOTLS")
.allowlist_type("^(MDBX|mdbx)_.*")
.allowlist_function("^(MDBX|mdbx)_.*")
.size_t_is_usize(true)
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/libmdbx-rs/src/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl EnvironmentFlags {
flags |= ffi::MDBX_LIFORECLAIM;
}

flags |= ffi::MDBX_NOTLS;
flags |= ffi::MDBX_NOSTICKYTHREADS;

flags
}
Expand Down
4 changes: 2 additions & 2 deletions crates/storage/libmdbx-rs/src/txn_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use crossbeam_queue::ArrayQueue;

/// Lock-free pool of reset read-only MDBX transaction handles.
///
/// With `MDBX_NOTLS` (which reth always sets), every `mdbx_txn_begin_ex` for a read transaction
/// calls `mvcc_bind_slot`, which acquires `lck_rdt_lock` — a pthread mutex. Under high
/// With `MDBX_NOSTICKYTHREADS` (which reth always sets), every `mdbx_txn_begin_ex` for a read
/// transaction calls `mvcc_bind_slot`, which acquires `lck_rdt_lock` — a pthread mutex. Under high
/// concurrency (e.g., prewarming), this becomes a contention point.
///
/// This pool caches transaction handles that have been reset via `mdbx_txn_reset`. A reset handle
Expand Down
Loading