From 08f44474ee97ad54a9d0ddd5516ab9e8fce03112 Mon Sep 17 00:00:00 2001 From: Giedo Mak Date: Mon, 2 Oct 2017 14:52:48 +0200 Subject: [PATCH] actually use the max db-size as specified by withMaxDBSize --- .../java/com/pathdb/pathIndex/persisted/LMDBIndexFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/pathdb/pathIndex/persisted/LMDBIndexFactory.java b/src/main/java/com/pathdb/pathIndex/persisted/LMDBIndexFactory.java index 5066907..57ac2f0 100644 --- a/src/main/java/com/pathdb/pathIndex/persisted/LMDBIndexFactory.java +++ b/src/main/java/com/pathdb/pathIndex/persisted/LMDBIndexFactory.java @@ -51,7 +51,7 @@ public LMDBIndexFactory withMaxDBSize( long val, BinaryByteUnit unit ) public LMDB build() throws FileSystemException { - env = create().setMapSize( MEBIBYTES.toBytes( 42 ) ).setMaxDbs( 1 ).open( dbDir ); + env = create().setMapSize( unit.toBytes( val ) ).setMaxDbs( 1 ).open( dbDir ); db = env.openDbi( "pathdb.db", MDB_CREATE ); return new LMDB( env, db, new PersistedStatisticsStore() );