Skip to content

Commit

Permalink
Disable jemalloc in RocksDB
Browse files Browse the repository at this point in the history
  • Loading branch information
ark0f committed Nov 11, 2024
1 parent 8df573c commit 2be8dfb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions ethexe/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ license.workspace = true
homepage.workspace = true
repository.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ethexe-common.workspace = true
ethexe-runtime-common = { workspace = true, features = ["std"] }
Expand All @@ -19,10 +17,19 @@ anyhow.workspace = true
dashmap = "5.5.3"
parity-scale-codec.workspace = true
log = { workspace = true, features = ["std"] }
# TODO: jemalloc is not stable for OpenBSD and MSVC.
rocksdb = { version = "0.21", features = ["snappy", "jemalloc"] }

#[dev-dependencies]
# TODO: remove when https://github.com/tikv/jemallocator/pull/99 merged
[target.'cfg(target_env = "msvc")'.dependencies.rocksdb]
default-features = false
features = ["snappy"]
version = "0.21"

[target.'cfg(not(target_env = "msvc"))'.dependencies.rocksdb]
default-features = false
features = ["snappy", "jemalloc"]
version = "0.21"

[dev-dependencies]
scopeguard.workspace = true
tempfile = "3.3.0"
tempfile.workspace = true
serde.workspace = true
3 changes: 2 additions & 1 deletion ethexe/db/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ impl Clone for Database {
}
}

#[derive(Debug, Clone, Default, Encode, Decode, serde::Serialize)]
#[cfg_attr(test, derive(serde::Serialize))]
#[derive(Debug, Clone, Default, Encode, Decode)]
struct BlockSmallMetaInfo {
block_end_state_is_valid: bool,
is_empty: Option<bool>,
Expand Down

0 comments on commit 2be8dfb

Please sign in to comment.