orientdb
orientdb copied to clipboard
[1.7.9] OutOfMemoryError while creating an index on a datetime property
Hi, I have a class with almost 1M records. One property is defined as: create class _BB_Node extends ORestricted; create property _BB_Node._creation_date datetime
Without indexes, if I try to execute a query like:
orientdb {baasbox}> select from test where 1=1 order by _creation_date asc
Error: com.orientechnologies.orient.enterprise.channel.binary.OResponseProcessingException: Exception during response processing.
Error: java.lang.OutOfMemoryError: Java heap space
If I try to create the index: create index _bb_node._creation_date notunique
Exception in thread "OrientDB WAL Flush Task (baasbox)" java.lang.OutOfMemoryError: Java heap space
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter(AbstractQueuedSynchronizer.java:1801)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2016)
at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:609)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:602)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:957)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:917)
at java.lang.Thread.run(Thread.java:695)
2014-10-16 08:56:33,512 - [error] - application: main Error applying evolution to 0.8.5 level!!
java.lang.OutOfMemoryError: Java heap space
at java.util.Calendar.<init>(Calendar.java:932) ~[na:1.6.0_65]
at java.util.GregorianCalendar.<init>(GregorianCalendar.java:574) ~[na:1.6.0_65]
at java.util.Calendar.createCalendar(Calendar.java:1012) ~[na:1.6.0_65]
at java.util.Calendar.getInstance(Calendar.java:949) ~[na:1.6.0_65]
at com.orientechnologies.common.serialization.types.ODateTimeSerializer.deserializeFromDirectMemory(ODateTimeSerializer.java:88) ~[com.orientechnologies.orient-commons-1.7.9.jar:1.7.9]
at com.orientechnologies.common.serialization.types.ODateTimeSerializer.deserializeFromDirectMemory(ODateTimeSerializer.java:30) ~[com.orientechnologies.orient-commons-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurablePage.deserializeFromDirectMemory(ODurablePage.java:113) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.index.sbtree.local.OSBTreeBucket.getEntry(OSBTreeBucket.java:200) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.index.sbtree.local.OSBTree$OSBTreeCursorForward.next(OSBTree.java:289) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.index.engine.OSBTreeIndexEngine.size(OSBTreeIndexEngine.java:391) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.index.OIndexMultiValues.getSize(OIndexMultiValues.java:366) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.index.OIndexRebuildOutputListener.onCompletition(OIndexRebuildOutputListener.java:70) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.index.OIndexAbstract.rebuild(OIndexAbstract.java:422) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.index.OIndexAbstract.create(OIndexAbstract.java:222) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.index.OIndexMultiValues.create(OIndexMultiValues.java:235) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.index.OIndexMultiValues.create(OIndexMultiValues.java:46) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.index.OIndexManagerShared.createIndex(OIndexManagerShared.java:158) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.index.OIndexManagerProxy.createIndex(OIndexManagerProxy.java:75) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.metadata.schema.OClassImpl.createIndex(OClassImpl.java:1407) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLCreateIndex.execute(OCommandExecutorSQLCreateIndex.java:235) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:60) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.storage.OStorageEmbedded.executeCommand(OStorageEmbedded.java:94) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:83) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:59) ~[com.orientechnologies.orientdb-core-1.7.9.jar:1.7.9]
Could you send me memory dump during this OOM ?
Do you have skype or google talk ?
Hi, @laa I ran the same test with 2.0-M2 and the index creation goes fine. I think that this issue has been already resolved in more recent version. Thank you for you time.