ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Magda (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-2509) Broken eviction for OFFHEAP_VALUES cache mode
Date Sat, 30 Jan 2016 06:58:39 GMT
Denis Magda created IGNITE-2509:
-----------------------------------

             Summary: Broken eviction for OFFHEAP_VALUES cache mode
                 Key: IGNITE-2509
                 URL: https://issues.apache.org/jira/browse/IGNITE-2509
             Project: Ignite
          Issue Type: Bug
            Reporter: Denis Magda
            Assignee: Vladimir Ershov


In case when {{OFFHEAP_VALUES}} mode is used {{EvictionPolicy}} calculates values size wrongly
which leads to the fact that data is evicted only when either the limit on number of entries
is reached or size of keys is bigger than max allowed size.

To reproduce set the following cache configuration

{noformat}
        FifoEvictionPolicy plc = new FifoEvictionPolicy();
        plc.setMaxMemorySize(2 * 1024 * 1024);

        cacheCfg.setEvictionPolicy(plc);

        cacheCfg.setMemoryMode(CacheMemoryMode.OFFHEAP_VALUES);
        cacheCfg.setSwapEnabled(true);
{noformat}

Test that reproduces the issue is attached.

Also attached a patch that fixes the issue. However we should validate that the fix is full
and add additional tests to the test suites.

Finally, {{cache.metrics().getOffHeapAllocatedSize()}} always returns 0 for this cache mode.
Has to be fixed as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message