Details
-
Task
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
None
-
None
-
Docs Required, Release Notes Required
Description
Currently, cache dump can contain the same key several times.
In the read time we must maintain Set of read keys to filter out duplicates.
So dump read leads to high GC pressure.
We can overcome this issue and filter out duplicates in the write time:
- Iterator don't write keys that was written by beforeChange listener, already.
- Partition Iterator returns key in ascending order. Order set by CacheDataTree#compare method.
- beforeChange listener must not write keys that was already written by the iterator.
Cheap algorithm is the following:
- Store last key written by iterator.
- If changed key (in beforeChange) less then last key written by iterator then it must be skiped. Because, it already saved by the iterator.
Attachments
Issue Links
- links to