Hi,

I am trying to solve a problem that occurs when inserting related nodes in 
Neo4j. Nodes are inserted using the standard save method of 
org.springframework.data.neo4j.repository.GraphRepository.  The insertion 
process is ultimately driven by files picked up by Apache Camel from a drop 
folder, and runs in several threads, but the method that originates the 
calls to the repository is annotated @Neo4jTransactional.

Sometimes the insertion fails when fetching a related node in order to 
define a relationship.  The exception messages are like this: 
org.neo4j.graphdb.NotFoundException: 
'__type__' on http://neo4j:7474/db/data/relationship/105550, but a call to 
this URL using curl returns an object with the __type__ field containing 
the class name of the relationship.  It looks as though the condition that 
triggered the exception may be a transient one caused by a race between 
multiple inserting threads.  

Does @Neo4jTransactional not provide an atomic transaction?  And is it 
possible that a relationship can be retrieved from Neo4j while it is in a 
incomplete state, lacking the __type__ attribute required by Spring Data?

More importantly, can anyone suggest a workaround?  Running insertions in a 
single thread is not an option, as the data volumes in this application are 
large.

Thanks,

Chris

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to