Skip to content

Commit

Permalink
latest rocksdb-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
dejankos committed Sep 6, 2020
1 parent af40c29 commit 8201922
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
8 changes: 1 addition & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,16 @@ edition = "2018"
categories = ["http", "rocksdb", "storage"]
description = "RocksDb as a service"

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

[dependencies]
structopt = "0.3"
actix-web = "2.0"
actix-rt = "1.0"
actix-web-prom = "0.2"


serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

simplelog = "0.7.6"
log = "0.4.8"

rocksdb = "0.14.0"
rocksdb = "0.15.0"
confy = "0.4.0"
num_cpus = "1.0"
crossbeam = "0.7.3"
Expand Down
4 changes: 2 additions & 2 deletions config/db_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ min_write_buffer_number_to_merge = 1
level_zero_stop_writes_trigger = 24
level_zero_slowdown_writes_trigger = 20
compaction_style = "Level"
max_background_compactions = 2
max_background_flushes = 2
#block based

6 changes: 0 additions & 6 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ pub struct RocksDbConfig {
level_zero_stop_writes_trigger: i32,
level_zero_slowdown_writes_trigger: i32,
compaction_style: String,
max_background_compactions: i32,
max_background_flushes: i32,
}

impl Default for RocksDbConfig {
Expand All @@ -89,8 +87,6 @@ impl Default for RocksDbConfig {
level_zero_stop_writes_trigger: 24,
level_zero_slowdown_writes_trigger: 24,
compaction_style: "Level".to_string(),
max_background_compactions: 2,
max_background_flushes: 2,
}
}
}
Expand Down Expand Up @@ -120,8 +116,6 @@ impl RocksDbConfig {
opts.set_level_zero_stop_writes_trigger(self.level_zero_stop_writes_trigger);
opts.set_level_zero_slowdown_writes_trigger(self.level_zero_slowdown_writes_trigger);
opts.set_compaction_style(get_compaction_style(&self.compaction_style));
opts.set_max_background_compactions(self.max_background_compactions);
opts.set_max_background_flushes(self.max_background_flushes);
opts.create_if_missing(true);

opts
Expand Down

0 comments on commit 8201922

Please sign in to comment.