neo4j/neo4j — pull request #1886 by tinwelint (2014-01-30 12:22:40+00:00)
Title: Doesn't close IndexReader after verifying deferred constraints

that should be up to the SearcherManager. Closing the IndexReader manually
and then trying to release the searcher holding will fail and consecutive
calls to SearcherManager#acquire will get stuck in busy-loop.

This solves a problem that caused the index population phase to hang after
the node scan was complete, when flipping to ONLINE state and there were
one or more updates to apply before flipping. Having a constraint creation
hang caused the schema write lock be held indefinitely.