次のようなサイファーがあります。
START n=node:ACCOUNTS(ACCOUNT_ID={id})
MATCH (n)-[:PROVIDER]->(p)<-[r:ALERT]-(m)
RETURN p.ID as pID, p.FIRST_NAME? as pFN, p.LAST_NAME? as pLN, count(r) as alerts
これは、負荷が高い場合でも常に正常に機能します。ただし、別のスレッド (トランザクション内) でリレーションシップを削除することがあります。
タイミングが極端に悪いと、次のエラーが発生します。
******Relationship 13407007 not found
org.neo4j.graphdb.NotFoundException: Relationship 13407007 not found
at org.neo4j.kernel.impl.core.NodeManager.__AW_getRelationshipForProxy(NodeManager.java:675)
at org.neo4j.kernel.impl.core.NodeManager.getRelationshipForProxy(NodeManager.java)
at org.neo4j.kernel.InternalAbstractGraphDatabase$5.lookupRelationship(InternalAbstractGraphDatabase.java:689)
at org.neo4j.kernel.impl.core.RelationshipProxy.getOtherNode(RelationshipProxy.java:73)
at org.neo4j.cypher.internal.pipes.matching.FilteringIterable$FilteringIterator.spoolToNextInLine(FilteringIterable.scala:58)
at org.neo4j.cypher.internal.pipes.matching.FilteringIterable$FilteringIterator.next(FilteringIterable.scala:49)
at org.neo4j.cypher.internal.pipes.matching.FilteringIterable$FilteringIterator.next(FilteringIterable.scala:35)
at scala.collection.convert.Wrappers$IteratorWrapper.next(Wrappers.scala:30)
at org.neo4j.kernel.impl.traversal.TraversalBranchImpl.__AW_next(TraversalBranchImpl.java:137)
at org.neo4j.kernel.impl.traversal.TraversalBranchImpl.next(TraversalBranchImpl.java)
at org.neo4j.kernel.impl.traversal.TraversalBranchWithState.next(TraversalBranchWithState.java:32)
at org.neo4j.kernel.PreorderDepthFirstSelector.__AW_next(PreorderDepthFirstSelector.java:52)
at org.neo4j.kernel.PreorderDepthFirstSelector.next(PreorderDepthFirstSelector.java)
at org.neo4j.kernel.impl.traversal.TraverserIterator.fetchNextOrNull(TraverserIterator.java:65)
at org.neo4j.kernel.impl.traversal.TraverserIterator.fetchNextOrNull(TraverserIterator.java:34)
at org.neo4j.helpers.collection.PrefetchingIterator.hasNext(PrefetchingIterator.java:55)
at scala.collection.convert.Wrappers$JIteratorWrapper.hasNext(Wrappers.scala:41)
at scala.collection.Iterator$$anon$13.__AW_hasNext(Iterator.scala:371)
at scala.collection.Iterator$$anon$13.hasNext(Iterator.scala)
at scala.collection.Iterator$$anon$13.__AW_hasNext(Iterator.scala:371)
at scala.collection.Iterator$$anon$13.hasNext(Iterator.scala)
at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
at scala.collection.Iterator$class.__AW_foreach(Iterator.scala:727)
at scala.collection.Iterator$class.foreach(Iterator.scala)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1156)
at org.neo4j.cypher.internal.pipes.EagerAggregationPipe.internalCreateResults(EagerAggregationPipe.scala:76)
at org.neo4j.cypher.internal.pipes.PipeWithSource.createResults(Pipe.scala:69)
at org.neo4j.cypher.internal.pipes.PipeWithSource.createResults(Pipe.scala:66)
at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl.org$neo4j$cypher$internal$executionplan$ExecutionPlanImpl$$prepareStateAndResult(ExecutionPlanImpl
.scala:164)
at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$getLazyReadonlyQuery$1.apply(ExecutionPlanImpl.scala:139)
at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl$$anonfun$getLazyReadonlyQuery$1.apply(ExecutionPlanImpl.scala:138)
at org.neo4j.cypher.internal.executionplan.ExecutionPlanImpl.execute(ExecutionPlanImpl.scala:38)
at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:72)
at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:76)
at org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:79)
暗号実行のためのトランザクションを開始しません。これを引き起こしている可能性のあるものと修正についてのアドバイスをお願いします。これは、Neo4j Community 1.9.3 を使用しています。