在当前情况下,节点数量很高,流失率很高(即添加/删除节点/关系)
异常堆栈跟踪
Exception in thread "main" java.lang.NegativeArraySizeException
at org.neo4j.collection.primitive.hopscotch.IntArrayBasedKeyTable.initializeTable(IntArrayBasedKeyTable.java:54)
at org.neo4j.collection.primitive.hopscotch.IntArrayBasedKeyTable.<init>(IntArrayBasedKeyTable.java:48)
at org.neo4j.collection.primitive.hopscotch.LongKeyTable.<init>(LongKeyTable.java:27)
at org.neo4j.collection.primitive.hopscotch.LongKeyTable.newInstance(LongKeyTable.java:45)
at org.neo4j.collection.primitive.hopscotch.LongKeyTable.newInstance(LongKeyTable.java:22)
at org.neo4j.collection.primitive.hopscotch.PowerOfTwoQuantizedTable.grow(PowerOfTwoQuantizedTable.java:117)
at org.neo4j.collection.primitive.hopscotch.HopScotchHashingAlgorithm.growTable(HopScotchHashingAlgorithm.java:290)
at org.neo4j.collection.primitive.hopscotch.HopScotchHashingAlgorithm.put(HopScotchHashingAlgorithm.java:188)
at org.neo4j.collection.primitive.hopscotch.PrimitiveLongHashSet.add(PrimitiveLongHashSet.java:46)
at org.neo4j.kernel.impl.api.state.TxState.recordRelationshipDeleted(TxState.java:1353)
at org.neo4j.kernel.impl.api.state.TxState.relationshipDoDelete(TxState.java:550)
at org.neo4j.kernel.impl.api.state.RelationshipStateImpl.accept(RelationshipStateImpl.java:54)
at org.neo4j.kernel.impl.api.state.TxState.relationshipDoDeleteAddedInThisTx(TxState.java:578)
at org.neo4j.kernel.impl.api.StateHandlingStatementOperations.relationshipDelete(StateHandlingStatementOperations.java:472)
at org.neo4j.kernel.impl.api.ConstraintEnforcingEntityOperations.relationshipDelete(ConstraintEnforcingEntityOperations.java:310)
at org.neo4j.kernel.impl.api.LockingStatementOperations.relationshipDelete(LockingStatementOperations.java:307)
at org.neo4j.kernel.impl.api.OperationsFacade.relationshipDelete(OperationsFacade.java:870)
at org.neo4j.kernel.impl.core.RelationshipProxy.delete(RelationshipProxy.java:152)
at com.abakus.cmm.dictionary.Neo4jDictionary.joinPersonNode(Neo4jDictionary.java:249)
at com.abakus.cmm.dictionary.Neo4jDictionary.checkMergePersonNode(Neo4jDictionary.java:235)
at com.abakus.cmm.dictionary.Neo4jDictionary.registerRecord(Neo4jDictionary.java:205)
at com.abakus.cmm.dictionary.Neo4jDictionary.joinDictionary(Neo4jDictionary.java:331)
at com.abakus.cmm.dictionary.Neo4jLongDictionary.mergeDictionary(Neo4jLongDictionary.java:82)
at com.abakus.cmm.dictionary.Neo4jLongDictionary.mergeLongDictionary(Neo4jLongDictionary.java:52)
at com.abakus.cmm.dictionary.Neo4jLongDictionary.main(Neo4jLongDictionary.java:103)
答案 0 :(得分:0)
定期提交交易有助于解决上述问题。但是,仍然可以优化TxState代码并添加文档。这是在这个类的Javadoc