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 257162009C6 for ; Tue, 17 May 2016 02:45:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 24116160A19; Tue, 17 May 2016 00:45:23 +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 6B5F1160A16 for ; Tue, 17 May 2016 02:45:22 +0200 (CEST) Received: (qmail 49416 invoked by uid 500); 17 May 2016 00:45:21 -0000 Mailing-List: contact dev-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 dev@ignite.apache.org Received: (qmail 49405 invoked by uid 99); 17 May 2016 00:45:21 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 May 2016 00:45:21 +0000 Received: from mail-qg0-f45.google.com (mail-qg0-f45.google.com [209.85.192.45]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 13E181A0186 for ; Tue, 17 May 2016 00:45:20 +0000 (UTC) Received: by mail-qg0-f45.google.com with SMTP id 90so497603qgz.1 for ; Mon, 16 May 2016 17:45:20 -0700 (PDT) X-Gm-Message-State: AOPr4FWz134aHOaPXh1hDQg7kB0YdrfpXQSNXWmO786bOamiJokxS/UzYKn659oYC2UXhAIxDVtgQln8mMbQiU61 X-Received: by 10.140.146.10 with SMTP id 10mr34287210qhs.30.1463445919883; Mon, 16 May 2016 17:45:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.37.39 with HTTP; Mon, 16 May 2016 17:44:40 -0700 (PDT) In-Reply-To: References: <1462861575784-4853.post@n6.nabble.com> From: Dmitriy Setrakyan Date: Mon, 16 May 2016 17:44:40 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Fwd: Eviction Events with offheap values To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=001a11353aaa3400760532ff0e8f archived-at: Tue, 17 May 2016 00:45:23 -0000 --001a11353aaa3400760532ff0e8f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Guys, Resending this question to the dev list. Doesn=E2=80=99t Ignite fire an evi= ction event whenever an entry is evicted from off-heap memory? D. ---------- Forwarded message ---------- From: Alexei Scherbakov Date: Mon, May 16, 2016 at 1:33 AM Subject: Re: Eviction Events with offheap values To: user@ignite.apache.org Andrey, thanks for the clarification. Abraham, it seems EvictionPolicy is not appropriate solution for your case. BTW, why user session expiration logic is related to cache size ? In case user sessions expire by timeout the more appropriate solution would be listening to EVT_CACHE_OBJECT_EXPIRED event. You can also set eager expiration by calling CacheConfiguration.setEagerTtl(true) to make Ignite expire values automatically. Did this help? 2016-05-13 19:49 GMT+03:00 Andrey Gura : > Alexei, Abraham, > > Eviction policy configuration doesn't make sense for OFFHEAP_TIERED mode. > Eviction policy works only for on heap entries in order to evict entries = to > offheap. > > For eviction of entries from offheap memory Ignite internaly uses other > LRU eviction policy and there is no way to change this behaviour via > configuration. > > On Thu, May 12, 2016 at 7:14 PM, Alexei Scherbakov < > alexey.scherbakoff@gmail.com> wrote: > >> Hi, >> >> I was not able to reproduce your case. >> In my test I have correct old value on eviction event. >> Please provide a reproducer. >> >> BTW: what are you trying to accomplish? Generally events are not very >> good for cluster performance and may not be delivered in case of the >> listener node failure. >> >> 2016-05-10 9:26 GMT+03:00 abraham : >> >>> Hi, >>> >>> I am re-posting an earlier message to which I did not get any replies >>> because I was not subscribed to the mailing list: >>> >>> I am trying to get the values from the eviction events. This works fine >>> with >>> the ONHEAP_TIERED version but not with OFFHEAP_VALUES and OFFHEAP_TIERE= D >>> - >>> in that cases the hasOldValue is true but the actual value is null. >>> >>> What we are trying to accomplish is to persist entries to a database on= ly >>> when they either get removed, expired or evicted because the max cache >>> size >>> is reached and it looks like those events are the only way to accomplis= h >>> this. >>> >>> A quick glance at the code would suggest that in the >>> org.apache.ignite.internal.processors.cache.GridCacheEvictionManager on= e >>> could replace line 708 from >>> >>> CacheObject oldVal =3D recordable ? entry.rawGet() : null; >>> >>> to >>> >>> CacheObject oldVal =3D recordable ? entry.rawGetOrUnmarshal(false) : nu= ll; >>> >>> to get the values attached to the events. Would that work? >>> >>> Thanks, >>> >>> Abraham >>> >>> >>> >>> -- >>> View this message in context: >>> http://apache-ignite-users.70518.x6.nabble.com/Eviction-Events-with-off= heap-values-tp4853.html >>> Sent from the Apache Ignite Users mailing list archive at Nabble.com. >>> >> >> >> >> -- >> >> Best regards, >> Alexei Scherbakov >> > > > > -- > Andrey Gura > GridGain Systems, Inc. > www.gridgain.com > --=20 Best regards, Alexei Scherbakov --001a11353aaa3400760532ff0e8f--