Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Identity Map stability issues #214

andreasronge opened this Issue · 4 comments

2 participants


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

  def current_user
    #raise 'abcde'

  helper_method :current_user


My page calls current user, User 1, which exists. What happens is this:

  • Uncomment the two lines in #current_user, see the error.
  • Re-comment them, reload the page. #current_user will return nil.
  • 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:

=> false

Note that the syntax Neo4j::Config[:identity_map] = false did not work for me in any location (application.rb or development.rb).



maybe the problem is that the IdentityMap is not cleared when an exception occurs.
The identity map cache is cleared here:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.