From 91c5d0c042d21208dce81d5715a237a61827a3a6 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Mon, 5 Jul 2021 16:36:13 +0200 Subject: [PATCH] Use the AlwaysFreePages flag when opening an index --- Cargo.lock | 6 +++--- benchmarks/Cargo.toml | 2 +- helpers/Cargo.toml | 2 +- http-ui/Cargo.toml | 2 +- infos/Cargo.toml | 2 +- milli/Cargo.toml | 2 +- milli/src/index.rs | 2 ++ search/Cargo.toml | 2 +- 8 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4aba285b7..050ba7c88 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -873,7 +873,7 @@ dependencies = [ [[package]] name = "heed" version = "0.12.0" -source = "git+https://github.com/Kerollmops/heed?tag=v0.12.0#6c0b95793a805dc598f05c119494e6c069de0326" +source = "git+https://github.com/Kerollmops/heed?tag=v0.12.1#8e5dc6d71c8166a8d7d0db059e6e51478942b551" dependencies = [ "byteorder", "heed-traits", @@ -891,12 +891,12 @@ dependencies = [ [[package]] name = "heed-traits" version = "0.7.0" -source = "git+https://github.com/Kerollmops/heed?tag=v0.12.0#6c0b95793a805dc598f05c119494e6c069de0326" +source = "git+https://github.com/Kerollmops/heed?tag=v0.12.1#8e5dc6d71c8166a8d7d0db059e6e51478942b551" [[package]] name = "heed-types" version = "0.7.2" -source = "git+https://github.com/Kerollmops/heed?tag=v0.12.0#6c0b95793a805dc598f05c119494e6c069de0326" +source = "git+https://github.com/Kerollmops/heed?tag=v0.12.1#8e5dc6d71c8166a8d7d0db059e6e51478942b551" dependencies = [ "bincode", "heed-traits", diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index 4e0b0d00c..b5ba9bf4f 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -11,7 +11,7 @@ milli = { path = "../milli" } jemallocator = "0.3.2" [dev-dependencies] -heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.0" } +heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" } criterion = { version = "0.3.4", features = ["html_reports"] } [build-dependencies] diff --git a/helpers/Cargo.toml b/helpers/Cargo.toml index af56b5eb7..6fad00a22 100644 --- a/helpers/Cargo.toml +++ b/helpers/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] anyhow = "1.0.38" byte-unit = { version = "4.0.9", default-features = false, features = ["std"] } -heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.0" } +heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" } milli = { path = "../milli" } stderrlog = "0.5.1" structopt = { version = "0.3.21", default-features = false } diff --git a/http-ui/Cargo.toml b/http-ui/Cargo.toml index 208917e54..9f425af3f 100644 --- a/http-ui/Cargo.toml +++ b/http-ui/Cargo.toml @@ -10,7 +10,7 @@ anyhow = "1.0.38" byte-unit = { version = "4.0.9", default-features = false, features = ["std"] } crossbeam-channel = "0.5.0" grenad = { git = "https://github.com/Kerollmops/grenad.git", rev = "3adcb26" } -heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.0" } +heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" } meilisearch-tokenizer = { git = "https://github.com/meilisearch/Tokenizer.git", tag = "v0.2.3" } memmap = "0.7.0" milli = { path = "../milli" } diff --git a/infos/Cargo.toml b/infos/Cargo.toml index 3377b141d..b257e6010 100644 --- a/infos/Cargo.toml +++ b/infos/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" anyhow = "1.0.38" byte-unit = { version = "4.0.9", default-features = false, features = ["std"] } csv = "1.1.5" -heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.0" } +heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" } milli = { path = "../milli" } roaring = "0.6.6" serde_json = "1.0.62" diff --git a/milli/Cargo.toml b/milli/Cargo.toml index 83f956b62..dfa02f89d 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -14,7 +14,7 @@ flate2 = "1.0.20" fst = "0.4.5" fxhash = "0.2.1" grenad = { git = "https://github.com/Kerollmops/grenad.git", rev = "3adcb26" } -heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.0", default-features = false, features = ["lmdb", "sync-read-txn"] } +heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1", default-features = false, features = ["lmdb", "sync-read-txn"] } human_format = "1.0.3" levenshtein_automata = { version = "0.2.0", features = ["fst_automaton"] } linked-hash-map = "0.5.4" diff --git a/milli/src/index.rs b/milli/src/index.rs index 6bcb0aebd..247e67d52 100644 --- a/milli/src/index.rs +++ b/milli/src/index.rs @@ -3,6 +3,7 @@ use std::collections::{HashMap, HashSet}; use std::path::Path; use chrono::{DateTime, Utc}; +use heed::flags::Flags; use heed::types::*; use heed::{Database, PolyDatabase, RoTxn, RwTxn}; use roaring::RoaringBitmap; @@ -106,6 +107,7 @@ impl Index { use db_name::*; options.max_dbs(14); + unsafe { options.flag(Flags::MdbAlwaysFreePages) }; let env = options.open(path)?; let main = env.create_poly_database(Some(MAIN))?; diff --git a/search/Cargo.toml b/search/Cargo.toml index 223516721..83722c516 100644 --- a/search/Cargo.toml +++ b/search/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] anyhow = "1.0.38" byte-unit = { version = "4.0.9", default-features = false, features = ["std"] } -heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.0" } +heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1" } log = "0.4.14" milli = { path = "../milli" } serde_json = "1.0.62"