neo4j/neo4j — pull request #3186 by digitalstain (2014-09-30 11:06:21+00:00)
Title: [2.2] Fixes stop() process in TransactionCommittingResponseUnpacker

TCRU uses the TransactionIdStore to update committing and applying
tx ids, as expected by the tx commit protocol. However, if a stop()
was issued, the txIdStore field would be set to null and if this
happened during a tx apply where the txIdStore.transactionCommitted()
call had already gone through, the subsequent transactionClosed() event
would fail with a NPE. This would leave the txIdStore waiting for a
transaction to apply, which would prohibit the database from shutting
down.
This patch removes the setting to null on stop approach and uses
a boolean to mark the stopped state in TCRU, not allowing any
more transactions to go through and allowing the shutdown to finish.