Hi again,

By accident (as usual) I stumbled across a new problem. I don't really
have the transaction handling under control, and am creating a lot of
new nodes and indexing them all in one transaction. At one time I got
a server timeout or similar, which I though would cause the
transaction to fail. However, it seems that the index has been updated
anyway because I am now getting a lovely excpetion:

org.neo4j.impl.core.NotFoundException: Node[41] not found.
        org.neo4j.impl.core.NodeManager.getNodeForProxy(NodeManager.java:363)
        org.neo4j.impl.core.NodeProxy.getSingleRelationship(NodeProxy.java:94)
        org.neo4j.util.btree.TreeNode.getFirstEntry(TreeNode.java:162)
        org.neo4j.util.btree.TreeNode.getEntry(TreeNode.java:379)
        org.neo4j.util.btree.BTree.getAsKeyEntry(BTree.java:322)
        
org.neo4j.util.index.AbstractIndex.getSingleNodeFor(AbstractIndex.java:374)
        
org.neo4j.util.index.MultiValueIndex.getSingleNodeFor(MultiValueIndex.java:15)
        
org.neo4j.util.index.NeoIndexService.getSingleNode(NeoIndexService.java:121)
        
org.foolip.mushup.MushArtistFactory.getArtistById(MushArtistFactory.java:46)
        org.foolip.mushup.Info.doGet(Info.java:54)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:585)
        org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
        java.security.AccessController.doPrivileged(Native Method)
        javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
        
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

Most of that is irrelevant, but anyway... does the indexing service do
some transaction handling internally, how ought I write my code to
guarantee that this can't happen?

Philip
_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to