neo4j/neo4j — pull request #3404 by chrisvest (2014-11-05 15:53:27+00:00)
Title: Fix bug in EphemeralFileSystem

When you write beyond the end of a file, the space in between is filled with zeros.
The EphemeralFileSystemAbstraction had insufficient synchronisation in that code, because it allowed
a thread to do a write beyond the end of the file, then another thread would write in the space in
between, and then the first thread would overwrite the new data with zeros.

During the course of debugging this, the PageCacheMonitor has been extended to also observe page
flushes.

This is a cherry-picked backport commit.

Conflicts:
community/io/src/main/java/org/neo4j/io/pagecache/PageCacheMonitor.java
community/io/src/main/java/org/neo4j/io/pagecache/impl/common/SingleFilePageSwapper.java
community/io/src/main/java/org/neo4j/io/pagecache/impl/standard/ClockSweepPageTable.java
community/io/src/main/java/org/neo4j/io/pagecache/impl/standard/StandardPinnablePage.java
community/io/src/test/java/org/neo4j/io/pagecache/CountingPageCacheMonitor.java
community/io/src/test/java/org/neo4j/io/pagecache/PageCacheTest.java
community/io/src/test/java/org/neo4j/io/pagecache/RecordingPageCacheMonitor.java
enterprise/enterprise-io/src/main/java/org/neo4j/io/enterprise/pagecache/impl/muninn/MuninnPage.java
enterprise/enterprise-io/src/main/java/org/neo4j/io/enterprise/pagecache/impl/muninn/MuninnPagedFile.java