Exception occurred in Groovy : 'java.util.ConcurrentModificationException
at com.thinkaurelius.titan.graphdb.transaction.addedrelations.SimpleAddedRelations.getView(SimpleAddedRelations.java:35)
at com.thinkaurelius.titan.graphdb.vertices.StandardVertex.getAddedRelations(StandardVertex.java:66)
at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.setProperty(StandardTitanTx.java:764)
at com.thinkaurelius.titan.graphdb.vertices.AbstractVertex.setProperty(AbstractVertex.java:244)
at com.thinkaurelius.titan.graphdb.vertices.AbstractVertex.setProperty(AbstractVertex.java:239)
at com.tinkerpop.blueprints.util.wrappers.batch.BatchGraph$BatchVertex.setProperty(BatchGraph.java:492)
at com.tinkerpop.blueprints.util.ElementHelper.setProperties(ElementHelper.java:164)
at com.tinkerpop.blueprints.util.ElementHelper$setProperties.call(Unknown Source)
at Script4$_bulkInsertion_closure1.doCall(Script4.groovy:14)
at Script4.bulkInsertion(Script4.groovy:6)
This occurred while inserting nodes using groovy script in Titan.
I have attached the groovy script.
What can be the cause for this? I have tried adding some nodes and updating removing the same nodes from another thread to reproduce the scenario, but I was not able to.
Also how can I set the Transaction configuration to multi-threaded so that instead of using "SimpleAddedRelations" I can use "ConcurrentAddedRelations" to avoid this scenario.