The current impl for the map does not use any eviction strategy, it just keeps the records that put first in it. A more proper way is we introduce a LRU eviction strategy, the in-memory cache can keep the keys that are accessed more frequent.
Imagine there is hot key that comes recent but spilled to disk, the LRU cache can ensure it is kept in memory which avoid unnecessary disk SE/DE overhead.
JIRA info
The current impl for the map does not use any eviction strategy, it just keeps the records that put first in it. A more proper way is we introduce a LRU eviction strategy, the in-memory cache can keep the keys that are accessed more frequent.
Imagine there is hot key that comes recent but spilled to disk, the LRU cache can ensure it is kept in memory which avoid unnecessary disk SE/DE overhead.
JIRA info