Skip to content

Commit

Permalink
Replace rocksdb with rust-rocksdb dependency
Browse files Browse the repository at this point in the history
The rust-rocksdb crate is a fork of rocksdb which is actively maintained.
For example, it depends on the latest RocksDB version 9.5.2 whereas rocksdb
depended on RocksDB 9.0.0.

This fixes restatedev#1885.
  • Loading branch information
tillrohrmann committed Aug 26, 2024
1 parent bbe0ac8 commit b4a65dd
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 34 deletions.
60 changes: 30 additions & 30 deletions Cargo.lock

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

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ reqwest = { version = "0.12.5", default-features = false, features = [
"stream",
] }
rlimit = { version = "0.10.1" }
rocksdb = { version = "0.22.0", features = [
"multi-threaded-cf",
], git = "https://github.com/restatedev/rust-rocksdb", rev = "c7ccbbcd261bdec011c4976c441676512a1a4841" }
rocksdb = { version = "0.29.0", package = "rust-rocksdb", features = ["multi-threaded-cf"], git = "https://github.com/restatedev/rust-rocksdb", rev = "8b621f1b4fb15ed0ba4a4b9da239432159e40b01" }
rustls = { version = "0.23.11", default-features = false, features = ["ring"] }
schemars = { version = "0.8", features = ["bytes", "enumset"] }
serde = { version = "1.0", features = ["derive"] }
Expand Down
5 changes: 4 additions & 1 deletion crates/rocksdb/src/db_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ impl RocksDbManager {
// no need to retain 1000 log files by default.
//
db_options.set_keep_log_file_num(2);
db_options.set_recycle_log_file_num(4);
if !opts.rocksdb_disable_wal() {
// RocksDB does not support recycling wal log files if wal is disabled when writing
db_options.set_recycle_log_file_num(4);
}
// Disable WAL archiving.
// the following two options has to be both 0 to disable WAL log archive.
db_options.set_wal_size_limit_mb(0);
Expand Down

0 comments on commit b4a65dd

Please sign in to comment.