jankotek/JDBM3 — Issue #10: Many uncommitted writes => StackOverflowError
Author: pdhborges
Created: 2012-02-22 22:39:25+00:00
State: open

Inserting a moderate number small objects causes a StackOverflowError. The problem persists even with the cache disabled.

```java

import net.kotek.jdbm.*;
import java.util.SortedMap;

public class App
{
public static void main( String[] args )
{
String fileName = "helloWorld";
DB db = new DBMaker(fileName).build();

SortedMap map = db.createTreeMap("mapName");

float[] featureVector = new float[100];

for (int i = 0; i < 100000; i++) {
map.put(i, featureVector);
}

db.commit();
db.close();
}
}
```

```
...
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)
at net.kotek.jdbm.DBStore.update2(DBStore.java:326)
at net.kotek.jdbm.DBStore.update(DBStore.java:306)
at net.kotek.jdbm.DBCache.purgeEntry(DBCache.java:478)
at net.kotek.jdbm.DBCache.cachePut(DBCache.java:417)
at net.kotek.jdbm.DBCache.insert(DBCache.java:156)
at net.kotek.jdbm.BTreeNode.writeValues(BTreeNode.java:1028)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:986)
at net.kotek.jdbm.BTreeNode.serialize(BTreeNode.java:43)

```