neo4j/neo4j — pull request #1328 by bennies (2013-10-18 12:45:36+00:00)
Title: Fix nullpointer on PersistenceWindowPool.acquire when accessing brickArray

We see this nullpointer when using 2.0.0-M05:
```
java.lang.NullPointerException
at org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.acquire(PersistenceWindowPool.java:180)
at org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.acquireWindow(CommonAbstractStore.java:437)
at org.neo4j.kernel.impl.nioneo.store.AbstractDynamicStore.forceGetRecord(AbstractDynamicStore.java:397)
at org.neo4j.kernel.impl.nioneo.store.SchemaStore$1.fetchNextOrNull(SchemaStore.java:88)
at org.neo4j.kernel.impl.nioneo.store.SchemaStore$1.fetchNextOrNull(SchemaStore.java:77)
at org.neo4j.helpers.collection.PrefetchingIterator.hasNext(PrefetchingIterator.java:55)
at org.neo4j.helpers.collection.Iterables$FilterIterable$FilterIterator.moveToNextValid(Iterables.java:697)
at org.neo4j.helpers.collection.Iterables$FilterIterable$FilterIterator.hasNext(Iterables.java:741)
at org.neo4j.helpers.collection.Iterables$MapIterable$MapIterator.hasNext(Iterables.java:639)
at org.neo4j.kernel.api.operations.ConstraintEnforcingEntityWriteOperations.nodeAddLabel(ConstraintEnforcingEntityWriteOperations.java:59)
at org.neo4j.kernel.impl.api.LockingStatementOperations.nodeAddLabel(LockingStatementOperations.java:74)
at org.neo4j.kernel.api.DataStatement.nodeAddLabel(DataStatement.java:70)
at org.neo4j.kernel.impl.core.NodeProxy.addLabel(NodeProxy.java:459)
```
From the code it looks the brickArray is not always consistently locked causing this problem.