Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't allow CACHE_SIZE to exceed the maximum memory available.

  • Loading branch information...
commit 3e95b48ac920b0baaa70f562460c33da693a7894 1 parent 6fd4a47
@ijuma ijuma authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/unit/voldemort/store/bdb/BdbSplitStorageEngineTest.java
View
4 test/unit/voldemort/store/bdb/BdbSplitStorageEngineTest.java
@@ -46,8 +46,8 @@
private File bdbMasterDir;
private BdbStorageConfiguration bdbStorage;
- // Berkeley DB keeps growing cache till 500MB
- private static long CACHE_SIZE = 500 * 1000 * 1000;
+ private static long CACHE_SIZE = (long) Math.min(Runtime.getRuntime().maxMemory() * 0.95,
+ 500 * 1000 * 1000);
@Override
protected void setUp() throws Exception {
Please sign in to comment.
Something went wrong with that request. Please try again.