The stacktrace says to me that it is a threading problem. Two threads
enter relationship delete at the same time, one of them wins the lock
on the relationships deleting it. Upon commit the lock is released and
the other thread tries to load the relationship from store since it
can't find it resulting in the exception you get.

Can you reproduce this with a code example? Also if you enable
assertions do you get some other exception then?

I'll add a check later today that will throw an exception earlier if
many threads are deleting the same relationship or node at the same
time.

Regards
Johan

On 3/14/08, Jonas Bergvall <[EMAIL PROTECTED]> wrote:
> Hi all!
>
>
>
>  I regularly get this exception below, caused by the final delete() in the
>  following code snippet (part of a linked list implemented using Neo)
>
>
>
>  Relationship lastItemRel = rootNode.getSingleRelationship(relType,
>  Direction.INCOMING);
>
>  if (lastItemRel != null) {
>
>     lastItem = lastItemRel.getStartNode();
>
>     lastItemRel.delete();
>
>  }
>
>
>
>  org.neo4j.impl.nioneo.store.StoreFailureException: Record[17562] not in use
>
>  at
>  org.neo4j.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.ja
>  va:173)
>
>  at
>  org.neo4j.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.ja
>  va:105)
>
>  at
>  org.neo4j.impl.nioneo.xa.NeoTransaction.relDelete(NeoTransaction.java:507)
>
>  at
>  org.neo4j.impl.nioneo.xa.NeoStoreXaConnection$RelationshipEventConsumerImpl.
>  deleteRelationship(NeoStoreXaConnection.java:257)
>
>  at
>  org.neo4j.impl.nioneo.xa.NioNeoDbPersistenceSource$NioNeoDbResourceConnectio
>  n.relDelete(NioNeoDbPersistenceSource.java:163)
>
>  at
>  org.neo4j.impl.persistence.PersistenceManager.relDelete(PersistenceManager.j
>  ava:131)
>
>  at org.neo4j.impl.core.NodeManager.deleteRelationship(NodeManager.java:908)
>
>  at org.neo4j.impl.core.RelationshipImpl.delete(RelationshipImpl.java:177)
>
>  at org.neo4j.impl.core.RelationshipProxy.delete(RelationshipProxy.java:41)
>
>
>
>  I'm pretty sure this isn't a threading problem. So my question is, what can
>  be causing this? Does the stacktrace say anything to someone?
>
>
>
>  Cheers,
>
>  Jonas
>
>  _______________________________________________
>  Neo mailing list
>  User@lists.neo4j.org
>  https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to