mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-10 06:26:52 +00:00
Fix garage_db build on 32-bit systems
This commit is contained in:
@@ -55,14 +55,7 @@ fn open_db(path: PathBuf, engine: String) -> Result<Db> {
|
||||
Error(format!("Unable to create LMDB data directory: {}", e).into())
|
||||
})?;
|
||||
|
||||
let map_size = if u32::MAX as usize == usize::MAX {
|
||||
eprintln!(
|
||||
"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 = lmdb_adapter::recommended_map_size();
|
||||
|
||||
let db = lmdb_adapter::heed::EnvOpenOptions::new()
|
||||
.max_dbs(100)
|
||||
|
||||
Reference in New Issue
Block a user