diff options
author | Alex Auvolat <alex@adnab.me> | 2022-06-10 10:32:58 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-06-10 10:32:58 +0200 |
commit | c6c4f007f0e6610fcfcd03126c63f85c8daee9a5 (patch) | |
tree | 41020fbe04013d9ed0503b2e2754340410934b37 /src/model/garage.rs | |
parent | 1c2e5d9c369057676fdbd931108798f6b05f00dc (diff) | |
parent | 138e13071be37d873344cd03e316c87ff8057ea0 (diff) | |
download | garage-c6c4f007f0e6610fcfcd03126c63f85c8daee9a5.tar.gz garage-c6c4f007f0e6610fcfcd03126c63f85c8daee9a5.zip |
Merge branch 'main' into counters
Diffstat (limited to 'src/model/garage.rs')
-rw-r--r-- | src/model/garage.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/model/garage.rs b/src/model/garage.rs index 06ef25d1..15769a17 100644 --- a/src/model/garage.rs +++ b/src/model/garage.rs @@ -102,13 +102,7 @@ impl Garage { db_path.push("db.lmdb"); info!("Opening LMDB database at: {}", db_path.display()); std::fs::create_dir_all(&db_path).expect("Unable to create LMDB data directory"); - let map_size = - if u32::MAX as usize == usize::MAX { - warn!("LMDB is not recommended on 32-bit systems, database size will be limited"); - 1usize << 30 // 1GB for 32-bit systems - } else { - 1usize << 40 // 1TB for 64-bit systems - }; + let map_size = garage_db::lmdb_adapter::recommended_map_size(); let db = db::lmdb_adapter::heed::EnvOpenOptions::new() .max_dbs(100) |