Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade rocksdb to 0.22 #853

Merged
merged 2 commits into from
Aug 10, 2024
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 Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"fixed-hash",
"keccak-hash",
Expand Down
1 change: 1 addition & 0 deletions ethereum-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ arbitrary = ["ethbloom/arbitrary", "fixed-hash/arbitrary", "uint-crate/arbitrary
rlp = ["impl-rlp", "ethbloom/rlp", "primitive-types/rlp"]
codec = ["impl-codec", "ethbloom/codec", "scale-info", "primitive-types/scale-info"]
num-traits = ["primitive-types/num-traits"]
rand = ["primitive-types/rand"]
8 changes: 4 additions & 4 deletions kvdb-rocksdb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ regex = "1.3.1"
[target.'cfg(any(target_os = "openbsd", target_env = "msvc"))'.dependencies.rocksdb]
default-features = false
features = ["snappy"]
version = "0.21"
version = "0.22.0"

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

[dev-dependencies]
alloc_counter = "0.0.4"
criterion = "0.5"
ethereum-types = { path = "../ethereum-types" }
ethereum-types = { path = "../ethereum-types", features = ["rand"] }
kvdb-shared-tests = { path = "../kvdb-shared-tests", version = "0.11" }
rand = "0.8.0"
tempfile = "3.1.0"
keccak-hash = { path = "../keccak-hash" }
sysinfo = "0.29.0"
sysinfo = "0.30.13"
ctrlc = "3.1.4"
chrono = "0.4"
2 changes: 1 addition & 1 deletion kvdb-rocksdb/examples/memtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use std::sync::{
atomic::{AtomicBool, Ordering as AtomicOrdering},
Arc,
};
use sysinfo::{get_current_pid, ProcessExt, System, SystemExt};
use sysinfo::{get_current_pid, System};

const COLUMN_COUNT: u32 = 100;

Expand Down
2 changes: 1 addition & 1 deletion kvdb-rocksdb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ rocksdb.db.get.micros P50 : 2.000000 P95 : 3.000000 P99 : 4.000000 P100 : 5.0000
assert!(settings.contains(" block_size: 323232"));

// LRU cache (default column)
assert!(settings.contains("block_cache_options:\n capacity : 8388608"));
assert!(settings.contains("block_cache_options:\n capacity : 115343360"));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't checked why it changed here, but this should be OK.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cache size was probably changed? Can you maybe check that in the changelogs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change may relate to https://github.com/facebook/rocksdb/blob/main/HISTORY.md#public-api-changes-10

I can dig more if you think this is important

// LRU cache for non-default columns is ⅓ of memory budget (including default column)
let lru_size = (330 * MB) / 3;
let needle = format!("block_cache_options:\n capacity : {}", lru_size);
Expand Down
2 changes: 1 addition & 1 deletion primitive-types/impls/serde/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ std = ["serde/std"]
serde = { version = "1.0.101", default-features = false, features = ["alloc"] }

[dev-dependencies]
criterion = "0.3.0"
criterion = "0.5.1"
serde_derive = "1.0.101"
serde_json = "1.0.41"
uint = { version = "0.9.5", path = "../../../uint" }
Expand Down
Loading