neo4j/neo4j — pull request #1451 by boggle (2013-11-10 21:33:00+00:00)
Title: Ensure that we remove index entries when labels and properties of a node...

... are changed in the same transaction

When we build REMOVE NodePropertyUpdates based on node commands we read the before value from
the store. This is incorrect when the property and labels have changed in the same transaction and can cause
IndexingService to not correctly remove index entries.

To side-step this issue, this commit builds a lookup table from (nodeId, pkId) to NodePropertyUpdate
for CHANGE updates in WriteTransaction. These updates contain the correct before value and lead the proper
de-indexing.

A solution that doesn't need a lookup table would be nice but this fixes it for now.