infinispan/infinispan — pull request #1455 by galderz (2012-11-07 11:48:22+00:00)
Title: ISPN-2384 Avoid losing entries with concurrent passivation/activation

REQUIRES CAREFUL REVIEW

* Fixed by making sure that evicting an entry as a result of exciding the given max size is done within the internal hash map segment lock, and make sure activations happen within this lock too.

* This way, concurrent passivation/activation operations will be lined in such way that removing from store (activation) won't happen at the same time as removing entries from memory without providing guarantees that the entry remains in memory.

* Added a unit to replicate this entry loss.

* Activation interceptor still needed to handle environments where eviction happens manually, via cache.evict() calls.