neo4j/neo4j — pull request #1448 by thobe (2013-11-08 15:33:45+00:00)
Title: Do not read from non-recovered store files.

During recovery, reading from the store files is not safe, since they
might be in an inconsistent state until the store has completed the
recovery phase. The transaction log does not contain information about
data that did not change though, so rebuilding indexes requires reading
from the store files.

These changes defer the reading of the store files for the purpose of
rebuilding the indexes. We keep a running set of which nodes have been
updated by the commands in the recovery processes, and at the end of
recovery we drop any information about those nodes from the indexes, and
rebuild them by reading the current (final, consistent, and stable)
state of each changed node from the store files.