Skip to content

Commit

Permalink
Fix dump mistake and do not use TLS when we said so
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Dec 20, 2024
1 parent a4c3bd2 commit 67b5380
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions heed/src/envs/env_open_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ impl<T: TlsUsage> EnvOpenOptions<T> {
let Self { map_size, max_readers, max_dbs, flags, _tls_marker: _ } = self;
EnvOpenOptions { map_size, max_readers, max_dbs, flags, _tls_marker: PhantomData }
}

/// Set the size of the memory map to use for this environment.
///
/// It must be a multiple of the OS page size.
Expand Down Expand Up @@ -462,9 +463,9 @@ impl<T: TlsUsage> EnvOpenOptions<T> {
#[allow(deprecated)] // NO_TLS is inside of the crate
let flags = if T::ENABLED {
// TODO make this a ZST flag on the Env and on RoTxn (make them Send when we can)
self.flags | EnvFlags::NO_TLS
} else {
self.flags
} else {
self.flags | EnvFlags::NO_TLS
};

let result = ffi::mdb_env_open(env, path_str.as_ptr(), flags.bits(), 0o600);
Expand Down

0 comments on commit 67b5380

Please sign in to comment.