[ 
https://issues.apache.org/jira/browse/TINKERPOP-2837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17706839#comment-17706839
 ] 

ASF GitHub Bot commented on TINKERPOP-2837:
-------------------------------------------

spmallette commented on PR #1908:
URL: https://github.com/apache/tinkerpop/pull/1908#issuecomment-1490127461

   thanks for looking into this further. unfortunately, it's creating more 
questions. Not sure how others feel but I'm hesitant to include another 
dependency here to solve this, especially a deprecated one that is not 
maintained anymore. it's also changing gryo which would make server backward 
incompatible with drivers, e.g. 3.5.6 server would stop working with a 3.5.5 
driver. gryo is deprecated i suppose but i'd say it remains a concern in my 
mind. 
   
   Given those issues, I'd like this approach to be a last resort and even then 
I'd consider relegating it to a newer version that doesn't break compatibility. 
Do you feel like we have reached a position of last resort at this point? If 
so, could you share other approaches you've tried that didn't really work well?
   
   thanks for your patience on this - sometimes the smallest bugs can be a 
nuisance to fix and generate a lot of discussion.




> Thread-safe problem when using Collections.synchronizedMap in ImmutableMetrics
> ------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-2837
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2837
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: language
>    Affects Versions: 3.5.4
>            Reporter: Redriver
>            Priority: Major
>
> When I run the profile() in SparkGraphComputer, I got NPE:
>  
> g.V().hasLabel('Account').has('Source', 10).has('AccountId', 
> '1000017194').as('sourceAccount').match( 
> __.as('sourceAccount').outE().inV().hasLabel('phone').as('node1'), 
> __.as('sourceAccount').outE().inV().hasLabel('name').as('node2'), 
> __.as('node1').inE().outV().hasLabel('Account').as('targetAccount'), 
> __.as('targetAccount').outE().inV().as('node2'), where('targetAccount', 
> neq('sourceAccount'))).select('targetAccount').valueMap().profile()
>  
> 22/12/07 02:21:00.980 dag-scheduler-event-loop ERROR DAGScheduler: Failed to 
> update accumulator 17 (org.apache.spark.util.LegacyAccumulatorWrapper) for 
> task 188
> java.lang.NullPointerException
>         at 
> java.util.Collections$SynchronizedMap.entrySet(Collections.java:2613)
>         at 
> org.apache.tinkerpop.gremlin.process.traversal.util.MutableMetrics.aggregate(MutableMetrics.java:139)
>         at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ProfileStep$ProfileBiOperator.apply(ProfileStep.java:136)
>         at 
> org.apache.tinkerpop.gremlin.process.traversal.step.util.ProfileStep$ProfileBiOperator.apply(ProfileStep.java:130)
>         at 
> org.apache.tinkerpop.gremlin.spark.process.computer.MemoryAccumulator.addAccumulator(MemoryAccumulator.java:43)
>         at 
> org.apache.tinkerpop.gremlin.spark.process.computer.MemoryAccumulator.addInPlace(MemoryAccumulator.java:48)
>         at 
> org.apache.tinkerpop.gremlin.spark.process.computer.MemoryAccumulator.addInPlace(MemoryAccumulator.java:29)
>         at 
> org.apache.spark.util.LegacyAccumulatorWrapper.merge(AccumulatorV2.scala:512)
>         at 
> org.apache.spark.scheduler.DAGScheduler$$anonfun$updateAccumulators$1.apply(DAGScheduler.scala:1255)
>         at 
> org.apache.spark.scheduler.DAGScheduler$$anonfun$updateAccumulators$1.apply(DAGScheduler.scala:1246)
>         at 
> scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
>         at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
>         at 
> org.apache.spark.scheduler.DAGScheduler.updateAccumulators(DAGScheduler.scala:1246)
>         at 
> org.apache.spark.scheduler.DAGScheduler.handleTaskCompletion(DAGScheduler.scala:1341)
>         at 
> org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.doOnReceive(DAGScheduler.scala:2105)
>         at 
> org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2057)
>         at 
> org.apache.spark.scheduler.DAGSchedulerEventProcessLoop.onReceive(DAGScheduler.scala:2046)
>         at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:49)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to