//node.createIndex("nodeididx", OClass.INDEX_TYPE.UNIQUE, "nodeid");
//graph.createKeyIndex("nodeid", Vertex.class, new Parameter("type", "UNIQUE"), new Parameter("class", "Node"));
graph.createKeyIndex("nodeid", Vertex.class, new Parameter("class", "Node"));
From this I got a heap space issue after inserting the 389137'th node and when using local storage with OGraphDatabase. I do commit each transaction. I have not seen this error when using the old createKeyIndex.
node 1967ms
node 389136
node 3885ms
node 389137
Exception in thread "Timer-0" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOfRange(Arrays.java:2694)
at java.lang.String.<init>(String.java:203)
at java.lang.String.substring(String.java:1913)
at java.io.UnixFileSystem.parentOrNull(UnixFileSystem.java:227)
at java.io.UnixFileSystem.canonicalize(UnixFileSystem.java:160)
at java.io.File.getCanonicalPath(File.java:589)
at java.util.prefs.FileSystemPreferences.lockFile(FileSystemPreferences.java:902)
at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:729)
at java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:824)
at java.util.prefs.FileSystemPreferences.syncWorld(FileSystemPreferences.java:464)
at java.util.prefs.FileSystemPreferences.access$1200(FileSystemPreferences.java:50)
at java.util.prefs.FileSystemPreferences$3.run(FileSystemPreferences.java:432)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Error after the transaction has been committed. The transaction remains valid. The exception caught was on execution of %s.onAfterTxCommit()
com.orientechnologies.orient.core.exception.OTransactionBlockedException: Error after the transaction has been committed. The transaction remains valid. The exception caught was on execution of %s.onAfterTxCommit()
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at com.orientechnologies.common.log.OLogManager.debug(OLogManager.java:69)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.commit(ODatabaseRecordTx.java:140)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:457)
at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:54)
at
za.co.enerweb.testorient.App$1.node(App.java:171)
at
za.co.enerweb.testorient.App$1.startElement(App.java:69)
regards
Richard.