neo4j/community — pull request #844 by thobe (2012-09-06 09:06:28+00:00)
Title: Improved adherance to the window locking protocol.

Before locking a LockableWindow it must be marked for use.
The code path following an expansion of the available bricks now follows this protocol.

Without this change it is possible (and quite likely) to get into a state where mapped memory is
never reclaimed, with severely lowered I/O performance following (due to falling back to
PersistanceRows).
It is (in theory) also possible to get into a state where a window is freed even though some thread
has marked it, although this has not been observed in a controlled environment yet.