Use the AlwaysFreePages flag when opening an index

This commit is contained in:
Kerollmops 2021-07-05 16:36:13 +02:00
parent 007fec21fc
commit 91c5d0c042
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
8 changed files with 11 additions and 9 deletions

View file

@ -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))?;