Looks like there might be a problem with the identity map. Maybe a threading issue ?
Also, there might be a performance problem as well (with lucene ?)
Reproduced, neo4j (2.2.1-java). Here's my stuff:
class ApplicationController < ActionController::Base
My page calls current user, User 1, which exists. What happens is this:
Reload the page. #current_user will behave as expected.
If I change the two linds to reference different users, there is no issue.
This issue has been remedied by adding the following line to application.rb:
config.neo4j.identity_map = false
And testing its disabled status via the console:
Note that the syntax Neo4j::Config[:identity_map] = false did not work for me in any location (application.rb or development.rb).
Neo4j::Config[:identity_map] = false
maybe the problem is that the IdentityMap is not cleared when an exception occurs.
The identity map cache is cleared here: https://github.com/andreasronge/neo4j/blob/master/lib/neo4j/rails/rack_middleware.rb#L21
Maybe we need to clear it hear as well:
Btw, nice to see you back !
Bingo. I added the L#35 identity map clear on my local gem, and that fixed the issue.
Good to be back! Glad to see how things are coming along :-)
Great, I will do a release today.
Make sure IdentityMap is cleared after an exception, closes #214