Hello,

My name is Michael Schneider, and I am learning OrientDB.

Orientdb Version 2.1rc2
Graph Type - FramedTransactionalGraph<OrientGraph>
Config Value 
OGlobalConfiguration.INDEX_EMBEDDED_TO_SBTREEBONSAI_THRESHOLD.setValue(-1)

I have a problem where:

1) create 2 types of vertices (500,000 of one time, and ~1 million of the 
second type)
2) There are ~200,000 data sets that define edge info between vertex types


In the concurrancy page http://orientdb.com/docs/last/Concurrency.html, in 
the "Concurrency Adding Edges" section.

*I noticed that there is a configuration parameter to create the edges 
outside of the vertex.*

*I set *
OGlobalConfiguration.INDEX_EMBEDDED_TO_SBTREEBONSAI_THRESHOLD.setValue(-1); 
during startup.

Workflow

***** Step 1 - Create Vertices in single thread
1) First all vertices are created 
2) Framed TransactionalGraph .commit()
3) FramedTransactionalGraph.shutdown


****** Step 2 - create a thread pool, and process N data sets in parallel.
1) read Edge info from data set file
2) create edges between pre-created verticies
3) FramedTransactionalGraph.commit()
4) FramedTransactionalGraph.shutdown() - give back to orient pool

Test 1) Set N=1 (process one data set at a time, no edges are created in 
parallel

Step 1 - create all vertices
Step 2 - Loop through all data set, process one data set at a time in 
application thread pool

Test 2) Set N=10 (process 10 edge data files in parallel)
Step 1 - create all vertices (success)
Step 2 - create application thread pool of size 10, process 10 data sets at 
time with edge data, on vertices are created, only edges)


I verified that Some of the vertices have a version > 1. From that docs, it 
looked like the vertex versions should all be 1. 
1) Initial creation of vertex - set to version 1
2) Adding edge with config value set to -1 should not increment version of 
vertex.(I could be wrong here).

Any Suggests on how to proceed?

-------------------------- Exception Trace -----------------------

Fail - 
Exception in thread "pool-2-thread-10" 
com.orientechnologies.orient.core.exception.OConcurrentModificationException: 
Cannot UPDATE the record #15:675500 because the version is not the latest. 
Probably you are updating an old record or it has been modified by another 
user (db=v2 your=v1)
at 
com.orientechnologies.orient.core.conflict.OVersionRecordConflictStrategy.checkVersions(OVersionRecordConflictStrategy.java:55)
at 
com.orientechnologies.orient.core.conflict.OVersionRecordConflictStrategy.onUpdate(OVersionRecordConflictStrategy.java:42)
at 
com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.checkAndIncrementVersion(OAbstractPaginatedStorage.java:1942)
at 
com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doUpdateRecord(OAbstractPaginatedStorage.java:1573)
at 
com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.updateRecord(OAbstractPaginatedStorage.java:713)
at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:1733)
at 
com.orientechnologies.orient.core.tx.OTransactionOptimistic.addRecord(OTransactionOptimistic.java:315)
at 
com.orientechnologies.orient.core.tx.OTransactionOptimistic.saveRecord(OTransactionOptimistic.java:249)
at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2298)
at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:95)
at 
com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1681)
at 
com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1672)
at 
com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:99)
at 
com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.recursiveLinkSave(ORecordSerializerBinaryV0.java:671)
at 
com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.writeOptimizedLink(ORecordSerializerBinaryV0.java:685)
at 
com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.writeSingleValue(ORecordSerializerBinaryV0.java:569)
at 
com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.serialize(ORecordSerializerBinaryV0.java:258)
at 
com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinary.toStream(ORecordSerializerBinary.java:104)
at 
com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:2173)
at 
com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:670)
at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:1667)
at 
com.orientechnologies.orient.core.tx.OTransactionOptimistic.addRecord(OTransactionOptimistic.java:315)
at 
com.orientechnologies.orient.core.tx.OTransactionOptimistic.saveRecord(OTransactionOptimistic.java:249)
at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2298)
at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:95)
at 
com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1681)
at 
com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1672)
at 
com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:99)
at 
com.orientechnologies.orient.core.db.record.ridbag.sbtree.OSBTreeRidBag.serialize(OSBTreeRidBag.java:763)
at 
com.orientechnologies.orient.core.db.record.ridbag.ORidBag.toStream(ORidBag.java:264)
at 
com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.writeSingleValue(ORecordSerializerBinaryV0.java:578)
at 
com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.serialize(ORecordSerializerBinaryV0.java:258)
at 
com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinary.toStream(ORecordSerializerBinary.java:104)
at 
com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:2173)
at 
com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:670)
at 
com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commitEntry(OAbstractPaginatedStorage.java:1991)
at 
com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commit(OAbstractPaginatedStorage.java:922)
at 
com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:491)
at 
com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:148)
at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2412)
at 
com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2382)
at 
com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:161)
at 
com.tinkerpop.frames.FramedTransactionalGraph.commit(FramedTransactionalGraph.java:25)
at 
com.siemens.plm.devops.prodview.ccovkernel.orientdb.bld.svc.CovFileProcessorTask.run(CovFileProcessorTask.java:43)

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to