IncidentToAdjacentStrategy -> ConcurrentModificationException

82 views
Skip to first unread message

RV

unread,
Jan 26, 2016, 9:20:25 AM1/26/16
to Gremlin-users
Hi,

Currently trying to figure out the following ConcurrentModificationException exception that occurs when I call the toList (Gremlin Scala) method on a traversal.
It doesn't happen all the time, but quite often on different graphs.
I'm processing different TinkerGraph graphs concurrently using Futures (in scala).

Using tinkerpop version 3.1.0-incubating

Exception in thread "main" java.util.ConcurrentModificationException
        at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
        at java.util.ArrayList$Itr.next(ArrayList.java:851)
        at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042)
        at org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper.hasStepOfAssignableClassRecursively(TraversalHelper.java:283)
        at org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategy.apply(IncidentToAdjacentStrategy.java:75)
        at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversalStrategies.applyStrategies(DefaultTraversalStrategies.java:77)
        at org.apache.tinkerpop.gremlin.process.traversal.lambda.AbstractLambdaTraversal.applyStrategies(AbstractLambdaTraversal.java:72)
        at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.applyStrategies(DefaultTraversal.java:96)
        at org.apache.tinkerpop.gremlin.process.traversal.Traversal.fill(Traversal.java:141)
        at org.apache.tinkerpop.gremlin.process.traversal.Traversal.toList(Traversal.java:102)
        at gremlin.scala.GremlinScala.toList(GremlinScala.scala:26)
        <removed>

I have the following traversal:

g.V
.hasLabel("Variable").as("v")
.in(Label.Def)
.repeat(_.out(Label.Successor))
.emit
.untilWithTraverser(noSuccessor)
.simplePath.path
.filter(endsWithUse)
.map(pathEnd).as("u")
.select
.toList.foreach(addUseEdge)

Not sure what is going wrong, so hopy anyone can help me out here.

Cheers,
RV





Marko Rodriguez

unread,
Jan 26, 2016, 9:40:34 AM1/26/16
to gremli...@googlegroups.com
Hi,

This was a bug that was fixed in 3.1.1-SNAPSHOT. Can you rewrite your traversal? See if you can isolate which step this is happening in and then I can tell you a rewrite.

Thanks,
Marko.
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/b6beac6c-82fe-49b5-bf87-5af982a31781%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages