neo4j/neo4j — pull request #2956 by tinwelint (2014-08-28 21:16:33+00:00)
Title: Last committed transaction refers to last forcefully appended to log

There was a race condition where
TransactionIdStore#getLastCommittedTransactionId() might return a
transaction id higher than existed in the log on disk, actually even even
before even appended to the log buffer. This resulted in a temporary
condition where a thread would query for last committed transaction id and
then try to retreive those transactions and would fail with an exception
saying that the requested transaction didn't exist.

So this commit introduces a phase before 'committed' which is 'committing'
and those are marked as committed when they have been forcefully committed
to the log. So TransactionIdStore#getLastCommittedTransactionId() method
name is unchanged, but its behaviour is changed to return the last
(highest) truly committed transaction, not the last committing.