So I've taken on this sub-task from Sanne (ISPN-1169), and here is the deal:
BCHM analyses whether or not to evict stuff every time an operation (put, get, replace) is run, based on the configured eviction policy (LIRS, LRU or NONE). It does so by calling evictionStrategy.execute(), which returns a Set of hash entries removed from the BCHM.
Note that execute() actually removes entries from the BCHM, so after execute() is called, these entries are no longer in the BCHM!
This is set is then sent to the EvictionManager
which in turn passivates the evicted entries:
So we have a window where the entry is neither accessible from memory or from a cache store, since it is "in-fly".
My proposed fix is to:
1) Make sure the PassivationManager is passed in to the DataContainer, and available to any EvictionStrategy
2) EvictionStrategies ensure passivation occurs *before* removing an entry from the BCHM