-
1. Re: Persistence: Retaining information about oldest entries for eviction over restart
william.burns May 3, 2016 12:23 PM (in response to apabst)Eviction is in memory only unfortunately. Only expiration is persisted in a store.
-
2. Re: Persistence: Retaining information about oldest entries for eviction over restart
apabst May 4, 2016 7:42 AM (in response to william.burns)Don't know if I made myself clear.
Which entry was least recently put is apparently persisted and respected by eviction even after a restart:
put key A
put key B
put key C
put key A
restart
additional puts that lead to eviction -> Entries are evicted in order B,C,A
Just not which entry was least recently used:
put key A, B, C in that order
get key B
get key C
get key A
restart
additional puts that lead to eviction -> Entries are evicted in order A,B,C
-
3. Re: Persistence: Retaining information about oldest entries for eviction over restart
dan.berindei May 4, 2016 9:16 AM (in response to apabst)Hi Andreas
Will is absolutely correct, eviction is only based on accesses and updates to entries in memory.
Simple tests that only insert a bunch of entries and restart the cache may work, but that doesn't mean it's going to keep working in more complex scenarios, for instance if you remove some of the entries and replace others. Sorry, but there just isn't any code in Infinispan to persist LRU/LIRS information on disk.
-
4. Re: Persistence: Retaining information about oldest entries for eviction over restart
apabst May 6, 2016 8:07 AM (in response to dan.berindei)I understand this behaviour is accidental rather than deliberate and probably doesn't scale, but for the record even with a unit test that puts 1000 entries, removes 25% of them and then replaces every second entry of the remaining I couldn't get it to mix up the order of least recent write access after a restart.
Either way, thank you for answering my initial question.