Ivan Rakov created IGNITE-12510:
-----------------------------------

             Summary: In-memory page eviction may fail in case very large 
entries are stored in the cache
                 Key: IGNITE-12510
                 URL: https://issues.apache.org/jira/browse/IGNITE-12510
             Project: Ignite
          Issue Type: Bug
    Affects Versions: 2.7.6
            Reporter: Ivan Rakov


In-memory page eviction (both DataPageEvictionMode#RANDOM_LRU and 
DataPageEvictionMode#RANDOM_2_LRU) has limited number of attempts to choose 
candidate page for data removal:

{code:java}
                if (sampleSpinCnt > SAMPLE_SPIN_LIMIT) { // 5000
                    LT.warn(log, "Too many attempts to choose data page: " + 
SAMPLE_SPIN_LIMIT);

                    return;
                }
{code}
Large data entries are stored in several data pages which are sequentially 
linked to each other. Only "head" pages are suitable for eviction, because the 
whole entry is available only from "head" page (list of pages is singly linked; 
there are no reverse links from tail to head).
The problem is that if we put large enough entries to evictable cache (e.g. 
each entry needs more than 5000 pages to be stored), there are too few head 
pages and "Too many attempts to choose data page" error is likely to show up.
We need to perform something like full scan if we failed to find a head page in 
SAMPLE_SPIN_LIMIT attempts instead of just failing node with error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to