diff options
author | Alex Auvolat <alex@adnab.me> | 2022-06-09 14:55:20 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-06-09 14:55:20 +0200 |
commit | 138e13071be37d873344cd03e316c87ff8057ea0 (patch) | |
tree | bc74cd3bab1657ca8fec7fda01aba949a9a0897e /src/garage | |
parent | b44d3fc796484a50cd6854f20c9b46e5fddedc9d (diff) | |
download | garage-fix-build.tar.gz garage-fix-build.zip |
Fix garage_db build on 32-bit systemsfix-build
Diffstat (limited to 'src/garage')
-rw-r--r-- | src/garage/server.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/garage/server.rs b/src/garage/server.rs index 697d3358..7aa6185f 100644 --- a/src/garage/server.rs +++ b/src/garage/server.rs @@ -57,12 +57,7 @@ pub async fn run_server(config_file: PathBuf) -> Result<(), Error> { 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) |