Skip to content
Snippets Groups Projects
Commit 3e703a23 authored by Éloïs's avatar Éloïs
Browse files

mod(dbs): remove compression

parent 54432696
No related branches found
No related tags found
No related merge requests found
Pipeline #12174 passed
...@@ -348,9 +348,6 @@ name = "cc" ...@@ -348,9 +348,6 @@ name = "cc"
version = "1.0.67" version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd"
dependencies = [
"jobserver",
]
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
...@@ -1191,12 +1188,6 @@ dependencies = [ ...@@ -1191,12 +1188,6 @@ dependencies = [
"wasm-bindgen", "wasm-bindgen",
] ]
[[package]]
name = "glob"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]] [[package]]
name = "gloo-timers" name = "gloo-timers"
version = "0.2.1" version = "0.2.1"
...@@ -1384,15 +1375,6 @@ version = "0.4.7" ...@@ -1384,15 +1375,6 @@ version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
[[package]]
name = "jobserver"
version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "972f5ae5d1cb9c6ae417789196c803205313edde988685da5e3aae0827b9e7fd"
dependencies = [
"libc",
]
[[package]] [[package]]
name = "js-sys" name = "js-sys"
version = "0.3.50" version = "0.3.50"
...@@ -2210,7 +2192,6 @@ dependencies = [ ...@@ -2210,7 +2192,6 @@ dependencies = [
"libc", "libc",
"log", "log",
"parking_lot", "parking_lot",
"zstd",
] ]
[[package]] [[package]]
...@@ -2787,34 +2768,3 @@ dependencies = [ ...@@ -2787,34 +2768,3 @@ dependencies = [
"syn", "syn",
"synstructure", "synstructure",
] ]
[[package]]
name = "zstd"
version = "0.5.4+zstd.1.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69996ebdb1ba8b1517f61387a883857818a66c8a295f487b1ffd8fd9d2c82910"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
version = "2.0.6+zstd.1.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98aa931fb69ecee256d44589d19754e61851ae4769bf963b385119b1cc37a49e"
dependencies = [
"libc",
"zstd-sys",
]
[[package]]
name = "zstd-sys"
version = "1.4.18+zstd.1.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1e6e8778706838f43f771d80d37787cb2fe06dafe89dd3aebaf6721b9eaec81"
dependencies = [
"cc",
"glob",
"itertools 0.9.0",
"libc",
]
...@@ -76,30 +76,7 @@ impl BackendConf for Mem { ...@@ -76,30 +76,7 @@ impl BackendConf for Mem {
impl BackendConf for Sled { impl BackendConf for Sled {
#[inline(always)] #[inline(always)]
fn gen_backend_conf(db_name: &'static str, profile_path_opt: Option<&Path>) -> SledConf { fn gen_backend_conf(db_name: &'static str, profile_path_opt: Option<&Path>) -> SledConf {
let mut conf = SledConf::default().flush_every_ms(Some(10_000)); let conf = SledConf::default().flush_every_ms(Some(10_000));
conf = match db_name {
"bc_v2" => {
if let Ok(compression_level) = std::env::var("DUNITER_BC_DB_COMPRESSION") {
conf.use_compression(true)
.compression_factor(i32::from_str(&compression_level).expect(
"Env var DUNITER_BC_DB_COMPRESSION must be a number beetween 1 and 22 !",
))
} else {
conf.use_compression(false)
}
}
"gva_v1" => {
if let Ok(compression_level) = std::env::var("DUNITER_GVA_DB_COMPRESSION") {
conf.use_compression(true)
.compression_factor(i32::from_str(&compression_level).expect(
"Env var DUNITER_GVA_DB_COMPRESSION must be a number beetween 1 and 22 !",
))
} else {
conf.use_compression(false)
}
}
_ => conf.use_compression(false),
};
if let Some(data_path) = profile_path_opt { if let Some(data_path) = profile_path_opt {
conf.path(data_path.join(format!("data/{}_sled", db_name))) conf.path(data_path.join(format!("data/{}_sled", db_name)))
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment