Neo4j не может прочитать определенные узлы. Выдает NotFoundException. Поврежденная база данных
После прерывания процесса импорта я завел поврежденную базу данных. Чтение узлов с определенной меткой почти всегда приводит к ошибке:
"Unable to load one or more relationships from Node[160147]. This usually happens when relationships are deleted by someone else just as we are about to load them."
Указанный узел является сверхсвязанным с множеством связей. Я не могу удалить ни его, ни его отношения (используя шифр), поскольку он выдает ту же ошибку. Это произошло в версии 2.1.0, однако с тех пор я обновился до 2.1.2 в тщетной надежде, что проблема будет решена.
Могу ли я каким-то образом удалить узел из файловой системы или как это спасти?
Стек ниже.
( [message] => Невозможно загрузить одно или несколько отношений с узла [160147]. Обычно это происходит, когда отношения удаляются кем-то другим, как раз когда мы собираемся их загрузить. Пожалуйста, попробуйте еще раз. [исключение] => NotFoundException [полное имя ] => org.neo4j.graphdb.NotFoundException [stacktrace] => Массив ( [0] => org.neo4j.kernel.impl.core.NodeImpl.loadMoreRelationshipsFromNodeManager(NodeImpl.java:481) [1] => org.ne4.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:358) [2] => org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:288) [3] => org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:260) [4] => org.neo4j.kernel.impl.core.NodeImpl.getAllRelationships(NodeImpl.java:151) [5] => org.ne.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:235) [6] => org.neo4j.kernel.impl.api.store.PersistenceCache.nodeGetRelationships(PersistenceCache.java:205) [7] => org.neo4j.kernel.impl.api.store.CacheLayer.nodeListRelationships(CacheLayer.java:445) [8] => org.neo4j.kernel.impl.api.StateHandlingStatementOperations.nodeGetRelationships(StateHandlingStatementOperations.java:992) [9] => org.neo4j.kernel.impl.api.Contraint ConstraintEnforcingEntityOperations.java:364) [10] => org.neo4j.kernel.impl.api.OperationsFacade.nodeGetRelationships(OperationsFacade.java:182) [11] => org.neo4j.kernel.impl.core.NodeProxy.Relations NodeProxy.java:143) [12] => org.neo4j.kernel.impl.core.NodeProxy.getRelationships(NodeProxy.java:76) [13] => org.neo4j.cypher.internal.spi.v2_1.TransactionBoundQueryContext.getRelationshipsFor(TransactionBoundQueryContext.scala:112) [14] => org.neo4j.cypher.internal.compiler.v2_1.spi.DelegatingQueryContext.getRelationshipsFor(DelegatingQueryContext.scala:57) [15] => org.neo4j.p.compiler.v2_1.spi.ExceptionTranslatingQueryContext.org$ Neo4j $ высчитывать $ внутренний $ компилятора $v2_1$ СПИ $ExceptionTranslatingQueryContext$$ супер $getRelationshipsFor(ExceptionTranslatingQueryContext.scala:59) [16] => org.neo4j.cypher.internal.compiler.v2_1.spi.ExceptionTranslatingQueryContext$$anonfun$getRelationshipsFor$1.apply(ExceptionTranslatingQueryContext.scala> 59 [17] [59]. cypher.internal.compiler.v2_1.spi.ExceptionTranslatingQueryContext $$ anonfun $ getRelationshipsFor $ 1.apply (ExceptionTranslatingQueryContext.scala: 59) [18] => org.neo4j.cypher.internal.compiler.v2_1.splj.Exception $ cypher $ внутренний $ компилятор $v2_1$spi$ExceptionTranslatingQueryContext$$translateException(ExceptionTranslatingQueryContext.scala:149) [19] => org.neo4j.cypher.internal.compiler.v2_1.spi.ExceptionTranslatingQueryTuenceTueryTueryTueryConuery Текст) [20] => org.neo4j.cypher.internal.compiler.v2_1.spi.DelegatingQueryContext.getRelationshipsFor(DelegatingQueryContext.scala:57) [21] => org.neo4j.cypher.internal.compiler.v2_1.pipes.matching.SingleStep$$anonfun$1.apply(SingleStep.scala:44) [22] => org.neo4j.cypher.internal.compiler.v2_1.pipes.matching.SingleStep$$anonfun$1.apply(SingleStep.scala:43) [23] => org.neo4j.cypher.internal.helpers.DynamicIterable$$anon$1.iterator(DynamicIterable.scala:28) [24] => org.neo4j.cypher.internal.helpers.DynamicJavaIterable$$anon$3.iterator(DynamicIterable.scala:38) [25] => org.neo4j.kernel.impl.traversal.TraversalBranchWithState.expandRelationshipsWithoutChecks(TraversalBranchWithState.java:71) [26] => org.neo4j.kernel.impl.traversal..StartNodeTraversalBranch.next(StartNodeTraversalBranch.java:47) [28] => org.neo4j.kernel.impl.traversal.AsOneStartBranch.next(AsOneStartBranch.java:100) [29] => org.neo4j.alforortra.tra.next(PreorderDepthFirstSelector.java:49) [30] => org.neo4j.kernel.impl.traversal.MonoDirectionalTraverserIterator.fetchNextOrNull(MonoDirectionalTraverserIterator.java:68) [31] => org.o. pl.traversal.MonoDirectionalTraverserIterator.fetchNextOrNull(MonoDirectionalTraverserIterator.java:35) [32] => org.neo4j.helpers.collection.Pre fetchingIterator.peek(Pre fetchingIterator.java:60) [33].>.Pre fetchingIterator.hasNext(Pre fetchingIterator.java:46) [34] => scala.collection.convert.Wrappers$JIteratorWrapper.hasNext(Wrappers.scala:41) [35] => scala.collection.Iterator$$anon$13.hasNext(Iterator.scala:371) [36] => scala.collection.Iterator$$anon$13.hasNext(Iterator.scala:371) [37] => scala.collection.Iterator$$anon$14.hasNext(Iterator.scala:388) [38] => scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327) [39] => scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327) [40] => scala.collection.Iterator$class.foreach(Iterator.scala:727) [41] => scala.collection.AbstractIterator.foreach(Iterator.scala:1157) [42] => scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48) [43] => scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:176) [44] => scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:45) [45] => scala.collection.TraversableOnce$class.to(TraversableOnce.scala:273) [46] => scala.collection.AbstractIterator.to(Iterator.scala:1157) [47] => scala.collection.TraversableOnce$class.toList(TraversableOnce.scala:257) [48] => scala.collection.AbstractIterator.toList(Iterator.scala:1157) [49] => org.neo4j.cypher.internal.compiler.v2_1.pipes.LegacySortPipe.internalCreateResults(LegacySortPipe.scala:32) [50] => org.neo4j.cypher.internal.compiler.v2_1.pipes.PipeWithSource.createResults(Pipe.scala:98) [51] => org.neo4j.cypher.internal.compiler.v2_1.pipes.PipeWithSource.createResults(Pipe.scala:95) [52] => org.neo4j.cypher.internal.compiler.v2_1.executionplan.ExecutionPlanBuilder$$anonfun$getExecutionPlanFunction$1$$anonfun$ применить $2.apply(ExecutionPlanBuilder.scala:119) [53] => org.neo4j.cypher.internal.compiler.v2_1.executionplan.ExecutionPlanBuilder$$anonfun$getExecutionPlanFunction$1$$anonfun$apply$2.apply(ExecutionPlanBuilder.scala:118) [54] => org.neo4j.cypher.internal.compiler.v2_1.executionplan.ExecutionWorkflowBuilder.runWithQueryState(ExecutionPlanBuilder.scala 16): > org.neo4j.cypher.internal.compiler.v2_1.executionplan.ExecutionPlanBuilder$$anonfun$getExecutionPlanFunction$1.apply(ExecutionPlanBuilder.scala:117) [56] => org.neo4j.cypher.internal.compiletionplan2.ExecutionPlanBuilder$$anonfun$getExecutionPlanFunction$1.apply(ExecutionPlanBuilder.scala:102) [57] => org.neo4j.cypher.internal.compiler.v2_1.executionplan.ExecutionPlanBuilder$$anon$1.execute [исполнительный лист]: ExecutionPlander: ExecutionPlander (Execution). 58] => org.neo4j.cypher.internal.compiler.v2_1.executionplan.ExecutionPlanBuilder$$anon$1.execute(ExecutionPlanBuilder.scala:67) [59] => org.neo4j.cypher.internal.ExecutionPlanWrapperCore1..scala:126) [60] => org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:75) [61] => org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:69) [62] => org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:84) [63] => org.neo4j.server.rest.web.CypherService.cypher(CypherService.java:114) [64] => java.lang.re flect.Method.invoke(Method.java:606) [65] => org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:139) [66] => java.lang.Thread.run(Thread.java:724)) [причина] => Массив ( [сообщение] => RelationshipRecord[2121672] не используется [исключение] => InvalidRecordException [stacktrace] => Array ( [0] => org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.java:267) [1] => org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:337) [2] => org.neo4j.kernel.impl.nioneo.xa.NeoStoreTransaction.getMoreRelationships(NeoStoreTransaction.java:1522) [3] => org.neo4j.kernel.impl.nioneo.xa.NeoStoreTransaction.getMoreRelationships(NeoStoreTransaction.java:1101) [4] => org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:89) [5] => org.neo4j.kernel.impl.core.RelationshipLoader.getMoreRelationships(RelationshipLoader.java:52) [6] => org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:786) [7] => org.neo4j.kernel.impl.core.NodeImpl.loadMoreRelationshipsFromNodeManager(NodeImpl.java:477) [8] => org.neo4j.nel.core.NodeImpl.getMoreRelationships(NodeImpl.java:358) [9] => org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:288) [10] => org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:260) [11] => org.neo4j.kernel.impl.core.NodeImpl.getAllRelationships(NodeImpl.java:151) [12] => org.neo4j.ker.imp.core.NodeImpl.getRelationships(NodeImpl.java:235) [13] => org.neo4j.kernel.impl.api.store.PersistenceCache.nodeGetRelationships(PersistenceCache.java:205) [14] => org.neo4j.kernel.impl.api.store.CacheLayer.nodeListRelationships(CacheLayer.java:445) [15] => org.neo4j.kernel.impl.api. org.neo4j.kernel.impl.api.OperationsFacade.nodeGetRelationships(OperationsFacade.java:182) [18] => org.neo4j.kernel.impl.core.NodeProxy.getRelationships(NodeProxy.java:143) [19] => org.neo4j.kernel.impl.core.NodeProxy.getRelationships(NodeProxy.java:76) [20] => org.neo4j.cypher.internal.spi.v2_1.TransactionBoundQueryContext.getRelationshipsFor(TransactionBoundQueryContext.scala 112): => org.neo4j.cypher.internal.compiler.v2_1.spi.DelegatingQueryContext.getRelationshipsFor(DelegatingQueryContext.scala:57) [22] => org.neo4j.cypher.internal.compiler.v2_1.spi.ExceptionTransljQuery $ $ высчитывать $ внутренний $ компилятора $v2_1$ СПИ $ExceptionTranslatingQueryContext$$ супер $getRelationshipsFor(ExceptionTranslatingQueryContext.scala:59) [23] => org.neo4j.cypher.internal.compiler.v2_1.spi.ExceptionTranslatingQueryContext$$anonfun$getRelationshipsFor$1.apply(ExceptionTranslatingQueryContext.scala:59) [24] => org.neoj.cypher.internal.compiler.v2_1.spi.ExceptionTranslatingQueryContext$$anonfun$getRelationshipsFor$1.apply(ExceptionTranslatingQueryContext.scala:59) [25] => org.neo4j.cypher.internal.compiler.v2_1.splj.Exception $ cypher $ внутренний $ компилятор $v2_1$spi$ExceptionTranslatingQueryContext$$translateException(ExceptionTranslatingQueryContext.scala:149) [26] => org.neo4j.cypher.internal.compiler.v2_1.spi.ExceptionTranslatingQueryTuenceTueryTueryTueryTueryConuinte) [27] => org.neo4j.cypher.internal.compiler.v2_1.spi.DelegatingQueryContext.getRelationshipsFor(DelegatingQueryContext.scala:57) [28] => org.neo4j.cypher.internal.compiler.v2_1.pipes.matching.SingleStep$$anonfun$1.apply(SingleStep.scala:44) [29] => org.neo4j.cypher.internal.compiler.v2_1.pipes.matching.SingleStep$$anonfun$1.apply(SingleStep.scala:43) [30] => org.neo4j.cypher.internal.helpers.DynamicIterable$$anon$1.iterator(DynamicIterable.scala:28) [31] => org.neo4j.cypher.internal.helpers.DynamicJavaIterable$$anon$3.iterator(DynamicIterable.scala:38) [32] => org.neo4j.kernel.impl.traversal.TraversalBranchWithState.expandRelationshipsWithversShecks (TraversState.java:71) [33] => org.neo4j.kernel.impl.traversal.TraversalBranchImpl.expandRelationships(TraversalBranchImpl.java:104) [34] => org.neo4j.kernel.impl.traversal.StartNodeTraversalBranch.nech.java:47) [35] => org.neo4j.kernel.impl.traversal.AsOneStartBranch.next(AsOneStartBranch.java:100) [36] => org.neo4j.graphdb.traversal.PreorderDepthFirstSelector.next.irstorSignorDnextFirst:49) [37] => org.neo4j.kernel.impl.traversal.MonoDirectionalTraverserIterator.fetchNextOrNull(MonoDirectionalTraverserIterator.java:68) [38] => org.neo4j.kernel.impl.traversal.MonoirectionalTraverserIterator.fetchNextOrNull(MonoDirectionalTraverserIterator.java:35) [39] => org.neo4j.helpers.collection.Pre fetchingIterator.peek(Pre fetchingIterator.java:60) [40] => org.neo4j.te f.col. PrefetchingIterator.java:46) [41] => scala.collection.convert.Wrappers$JIteratorWrapper.hasNext(Wrappers.scala:41) [42] => scala.collection.Iterator$$anon$13.hasNext(Iterator.scala:371) [43] => scala.collection.Iterator$$anon$13.hasNext(Iterator.scala:371) [44] => scala.collection.Iterator$$anon$14.hasNext(Iterator.scala:388) [45] => scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327) [46] => scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327) [47] => scala.collection.Iterator$class.foreach(Iterator.scala:727) [48] => scala.collection.AbstractIterator.foreach(Iterator.scala:1157) [49] => scala.collection.generic.Growable$class.$ плюс $ плюс $eq(Growable.scala:48) [50] => scala.collection.mutable.ListBuffer.$plus$plus$eq(ListBuffer.scala:176) [51] => scala.collection.mutable.ListBuffer.$ Plus$plus$eq(ListBuffer.scala:45) [52] => scala.collection.TraversableOnce$class.to(TraversableOnce.scala:273) [53] => scala.collection.AbstractIterator.to(Iterator.scala:1157) [54] => scala.collection.TraversableOnce$class.toList(TraversableOnce.scala:257) [55] => scala.collection.AbstractIterator.toList(Iterator.scala:1157) [56] => org.neo4j.cypher.internal.compiler.v2_1.pipes.LegacySortPipe.internalCreateResults(LegacySortPipe.scala:32) [57] => org.neo4j.cypher.internal.compiler.v2_1.pipes.PipeWithSource.createResults(Pipe.scala:98) [58] => org.neo4j.cypher.internal.compiler.v2_1.pipes.PipeWithSource.createResults(Pipe.scala:95) [59] => org.neo4j.cypher.internal.compiler.v2_1.executionplan.ExecutionPlanBuilder$$anonfun$getExecutionPlanFunction$1$$anonfun$apply$2.apply(ExecutionPlanBuilder.scala:119) [60] => org.neo4jternal.compher..v2_1.executionplan.ExecutionPlanBuilder $$ anonfun $ getExecutionPlanFunction $ 1 $$ anonfun $ применять $ 2.а pply(ExecutionPlanBuilder.scala:118) [61] => org.neo4j.cypher.internal.compiler.v2_1.executionplan.ExecutionWorkflowBuilder.runWithQueryState(ExecutionPlanBuilder.scala:169) [62] => org.ne.o4.compiler.v2_1.executionplan.ExecutionPlanBuilder$$anonfun$getExecutionPlanFunction$1.apply(ExecutionPlanBuilder.scala:117) [63] => org.neo4j.cypher.internal.compiler.v2_1.executionplan.ExecutionPlanBuunder $ $ (ExecutionPlanBuilder.scala:102) [64] => org.neo4j.cypher.internal.compiler.v2_1.executionplan.ExecutionPlanBuilder$$anon$1.execute(ExecutionPlanBuilder.scala:68) [65] => org.neo4j.cypher.internal.compiler.v2_1.executionplan.ExecutionPlanBuilder$$anon$1.execute(ExecutionPlanBuilder.scala:67) [66] => org.neo4j.cypher.internal.ExecutionPlanWrapperForV2_1.execute(CypherCompiler.scala = 67): > org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:75) [68] => org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:69) [69] => org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:84) [70] => org.neo4j.server.rest.web.CypherService.cypher(CypherService.java:114) [71] => java.lang.reflect.Method.invoke(Method.java:606) [72] => org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:139) [73] => java.lang.Thread.run(Thread.java:724)) [полное имя] => org.neo4j.kernel.impl.nioneo.store.InvalidRecordException))
2 ответа
Для проверки целостности вашего хранилища данных просмотрите отличный пост Марка.
Какой процесс импорта вы прервали? Если это был пакетный инсертор, то нет никаких гарантий для согласованных магазинов, если вы прервете его, и вам, вероятно, будет безопаснее повторить импорт.
Если это транзакция, не должно быть несоответствий.
Также обратите внимание, что у 2.1.0 были некоторые проблемы, и их не следует использовать, поэтому вы можете столкнуться с двойными проблемами.