lshift/diffa — pull request #123 by paulj (2012-04-23 23:02:43+00:00)
Title: Tombstone eviction should be performed by adding matches, not deleting events

Currently, when the version correlation store is synchronized with the differences store, new unmatched events are added, then all newly matched entities are removed via a call to `evictTombstones`. Currently, this call simply deletes all pending and unmatched events that match the given ids.

This is erroneous (as noted by a TODO in the code), since it fails to update the zoom caches, and it also fails to generate matched events necessary for incremental updates of event lists.

This patch removes the `removeEvents` call on the `DomainDifferencesStore`, and instead makes `evictTombstones` process each event as a matched event, which will cause the right events to be generated, and appropriate invalidation to occur in the caches.