neo4j/neo4j — pull request #3201 by tinwelint (2014-10-01 13:52:52+00:00)
Title: [2.2] Deleted nodes includes deleted dynamic label records

If a node that got deleted had dynamic label records they weren't
included in the "after" state of a node record, which means they wouldn't
be deleted when applying that node command on the store. Later on such
dynamic records would be viewed as inconsistencies since their owner was
not in use anymore.

This issue was recently introduced where some amount of cleverness was
removed from the store applier, cleverness including looking at
before/after start and merging the two, infering which records should be
deleted.

Now when writing a node record its dynamic records are always written to
the log, and always read back when reading from the log. Also when
deleting a node simply mark all dynamic label records as not in use
instead of clearing the list on the node record itself. This go hand in
hand with what is done around dynamic records in property records.