Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id ED79E200B7C for ; Thu, 8 Sep 2016 10:20:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EC0DA160ABD; Thu, 8 Sep 2016 08:20:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 47C81160AD0 for ; Thu, 8 Sep 2016 10:20:22 +0200 (CEST) Received: (qmail 22158 invoked by uid 500); 8 Sep 2016 08:20:21 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 22149 invoked by uid 99); 8 Sep 2016 08:20:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2016 08:20:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 3A97E2C1B80 for ; Thu, 8 Sep 2016 08:20:21 +0000 (UTC) Date: Thu, 8 Sep 2016 08:20:21 +0000 (UTC) From: "David Albrecht (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (IGNITE-3864) Decreasing max memory of SortedEvictionPolicy during runtime MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 08 Sep 2016 08:20:23 -0000 [ https://issues.apache.org/jira/browse/IGNITE-3864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Albrecht updated IGNITE-3864: ----------------------------------- Description: Decreasing the maxMemory Size of the SortedEvicitionPolicy using SortedEvicitionPolicy#setMaxMemorySize(long) during runtime results in an empty cache after another entry is put inside. Tested with the following scenario (see also attached screenshot): 1. Initizalize SortedEvicitionPolicy with {code}SortedEvictionPolicy evictionPolicy = new SortedEvictionPolicy<>(5000000);{code} 2. Set {code}evictionPolicy.setMaxMemorySize(2000000){code} 3. Put 10000 entries into cache. 4. Set {code}evictionPolicy.setMaxMemorySize(1000000){code} 5. Put another entry into cache. -> 0 entries are in cache. Since the method SortedEvictionPolicy.setMaxMemorySize(long) is also exposed via the mbean I would expect that decreasing the max memory size should work during runtime. (Increasing the max memory size works) In addition you can see that the CurrentMemory Size read from the SortedEvictionPolicy mbean via getCurrentMemorySize doesn't change after decreasing the max memory size. Even after all cache entries are evicted and the cache is complety empty was: Decreasing the maxMemory Size of the SortedEvicitionPolicy using SortedEvicitionPolicy#setMaxMemorySize(long) during runtime results in an empty cache after another entry is put inside. Tested with the following scenario (see also attached screenshot): 1. Initizalize SortedEvicitionPolicy with {code}SortedEvictionPolicy evictionPolicy = new SortedEvictionPolicy<>(5000000);{code} 2. Set {code}evictionPolicy.setMaxMemorySize(2000000){code} 3. Put 10000 entries into cache. 4. Set {code}evictionPolicy.setMaxMemorySize(1000000){code} 5. Put another entry into cache. -> 0 entries are in cache. Since the method SortedEvictionPolicy.setMaxMemorySize(long) is also exposed via the mbean I would expect that decreasing the max memory size should work during runtime. (Increasing the max memory size works) In addition you can see that the CurrentMemory Size read from the SortedEvictionPolicy mbean via {code}getCurrentMemorySize{code} doesn't change after decreasing the max memory size. Even after all cache entries are evicted and the cache is complety empty > Decreasing max memory of SortedEvictionPolicy during runtime > ------------------------------------------------------------ > > Key: IGNITE-3864 > URL: https://issues.apache.org/jira/browse/IGNITE-3864 > Project: Ignite > Issue Type: Bug > Affects Versions: 1.7 > Reporter: David Albrecht > Attachments: Decrease SortedEvicitionPolicy MaxMemory.png > > > Decreasing the maxMemory Size of the SortedEvicitionPolicy using SortedEvicitionPolicy#setMaxMemorySize(long) during runtime results in an empty cache after another entry is put inside. > Tested with the following scenario (see also attached screenshot): > 1. > Initizalize SortedEvicitionPolicy with > {code}SortedEvictionPolicy evictionPolicy = new SortedEvictionPolicy<>(5000000);{code} > 2. > Set {code}evictionPolicy.setMaxMemorySize(2000000){code} > 3. > Put 10000 entries into cache. > 4. > Set {code}evictionPolicy.setMaxMemorySize(1000000){code} > 5. > Put another entry into cache. > -> 0 entries are in cache. > Since the method SortedEvictionPolicy.setMaxMemorySize(long) is also exposed via the mbean I would expect that decreasing the max memory size should work during runtime. (Increasing the max memory size works) > In addition you can see that the CurrentMemory Size read from the SortedEvictionPolicy mbean via getCurrentMemorySize doesn't change after decreasing the max memory size. Even after all cache entries are evicted and the cache is complety empty -- This message was sent by Atlassian JIRA (v6.3.4#6332)