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 E04DE200C59 for ; Mon, 17 Apr 2017 09:44:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DEDB7160BAB; Mon, 17 Apr 2017 07:44:47 +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 0BDC0160B9C for ; Mon, 17 Apr 2017 09:44:46 +0200 (CEST) Received: (qmail 2902 invoked by uid 500); 17 Apr 2017 07:44:46 -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 2890 invoked by uid 99); 17 Apr 2017 07:44:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Apr 2017 07:44:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 652271A05FD for ; Mon, 17 Apr 2017 07:44:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.192 X-Spam-Level: **** X-Spam-Status: No, score=4.192 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id BLniwo7E9Yjc for ; Mon, 17 Apr 2017 07:44:41 +0000 (UTC) Received: from mail-yb0-f179.google.com (mail-yb0-f179.google.com [209.85.213.179]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id A0F945F39C for ; Mon, 17 Apr 2017 07:44:40 +0000 (UTC) Received: by mail-yb0-f179.google.com with SMTP id m133so28491671ybb.1 for ; Mon, 17 Apr 2017 00:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ffgu8BP1ziVeKp10ckv6tqcjU83O5ESOcCXjFh/oAVg=; b=Sgx/g6mKTlB9A5usNkGIk2ZCADOO+/h7tKbX9/ny0kXxLdbiXLF50+rkPoEcIqsOsW mJ1qwDYPRoPoPXOn2toCQKjGlYKDDhNv+517Ppb832TyTRi1VEoeEYpirqDNUTIW28+3 onktmWLLOm59N2ayjayJqjF6bafHexIWRPy24okGrM0QIyRzY/yA+wq2cdVBxro8QbZt g7Jcee0EWxiZCgrxwmP4KI8R0GC1SCkI0XkkYnuqwOJb6Xu9s92/+CmFPrB7QDMrNxDV KM9vFdX3CYQWevFOXVyQwCM15rNn4osmE3FbnD12W6FE9fOZP83wxyVmeWR0flooMoj6 1gNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ffgu8BP1ziVeKp10ckv6tqcjU83O5ESOcCXjFh/oAVg=; b=bMxlHdmVAoeA3VA/56ZWAXpSTyiv0PDp048rxbYYVIy2Mkf0VbwkG1eOfJnH+e9fS/ OtEUcAAyWiM3AetTaJa2gT6zPCSmbDRJOi/gO/TGYKh+/9QCWM47MB3vIQNdHjQa6d0A 0+fFxsPhbleUBh2gl+cMHEDSVRnuRZ4dW0gU+M03hkShL38A3IW8j3KKOaPFxTIHwYw6 OOACve+MaD8c9SIcu3SkZGgc/eZkSZYQUF1v08gcI0AST8VrA2Rkbb9pvGPtV7eO3jtm Di48gYfRLKtaIDAOUvhmN309nam/cH2aSru7M9a4vmcxwpjbUbYc6aZ2NSyif6aKYl5y W9gA== X-Gm-Message-State: AN3rC/6TrngLXnX0RmfrZskGtiDmefnvH3FQWQ3G0/QqK0UFl4JFqU+y JoIaKazUld96bYh7Hd9x9ZBahNYWng== X-Received: by 10.37.64.74 with SMTP id n71mr15111218yba.198.1492415073845; Mon, 17 Apr 2017 00:44:33 -0700 (PDT) MIME-Version: 1.0 References: <0A95B42E-0CF6-4484-9F08-D3A2DB850244@apache.org> <04ED1DB4-9BC7-463B-BFBD-C801EAFF42BD@apache.org> <35FDB988-6E02-4342-BC9C-5D27A90E3D9F@apache.org> <6379CAB6-48F3-43CD-8E81-E0EE6B53AA46@apache.org> <4E97EC29-E566-4654-955D-F78BF6E2446F@apache.org> In-Reply-To: <4E97EC29-E566-4654-955D-F78BF6E2446F@apache.org> From: ALEKSEY KUZNETSOV Date: Mon, 17 Apr 2017 07:44:23 +0000 Message-ID: Subject: Re: TouchedExpiryPolicy works incorrect in some cases IGNITE-4401 To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=001a11c0105855b38b054d57f6c8 archived-at: Mon, 17 Apr 2017 07:44:48 -0000 --001a11c0105855b38b054d57f6c8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Why do u think so. First of all, the output above is not correct. After 3 iteration key-value API strats to return empty value. Every 5 seconds(iteration sleep time) repository.getAttributes("1").size() is got called. Which makes an entry "touch" and the entry wont be expired for as long as 10 seconds. Expiry policy says: An {@link ExpiryPolicy} that defines the expiry {@link Duration} * of a Cache Entry based on when it was last touched. A touch includes ** creation, update or **access**.* =D0=BF=D1=82, 14 =D0=B0=D0=BF=D1=80. 2017 =D0=B3. =D0=B2 18:42, Denis Magda= : > The iteration happens multiple time which means that the key-value API ha= d > to return an empty result set on second or third iteration. But this neve= r > happens. > > In any case, do you want to find a root of the issue and fix it? > Otherwise, we can update the description and wait while someone else fixe= s > it. > > =E2=80=94 > Denis > > > On Apr 14, 2017, at 1:33 AM, ALEKSEY KUZNETSOV > wrote: > > > > Because expiry time is 10 seconds, while loop iterates every 5 seconds > > > > =D0=BF=D1=82, 14 =D0=B0=D0=BF=D1=80. 2017 =D0=B3. =D0=B2 11:32, ALEKSEY= KUZNETSOV >: > > > >> No, the bug is in SQL query, not key-value storage. > >> > >> =D0=BF=D1=82, 14 =D0=B0=D0=BF=D1=80. 2017 =D0=B3. =D0=B2 11:11, Vladis= lav Pyatkov : > >> > >>> Denis, Aleksey, > >>> > >>> It is correct, remember I have already said something like[1]. > >>> I have no idea, why this happened in this case with SQL. > >>> > >>> [1]: > >>> > >>> > http://apache-ignite-developers.2346864.n4.nabble.com/TouchedExpiryPolicy= -works-incorrect-in-some-cases-IGNITE-4401-td16349.html#a16356 > >>> > >>> On Fri, Apr 14, 2017 at 4:29 AM, Denis Magda > wrote: > >>> > >>>> I could reproduce the issue and this should be what Denis K. meant b= y > >>>> saying =E2=80=9Cexpiration policy works incorrectly=E2=80=9D. > >>>> > >>>> If you remove the expiration policy from the caches' configuration > then > >>>> the issue disappears. In general, SQL engine processes an expiration > >>> event > >>>> properly because the SQL queries return an empty result set as > expected > >>> but > >>>> something doesn=E2=80=99t work well with key-value operations. > >>>> > >>>> *Denis K*, *Vlad P.*, as creators of the ticket please confirm that > this > >>>> is the case. > >>>> > >>>> Please keep debugging this and switch to the latest Ignite version. > >>>> > >>>> =E2=80=94 > >>>> Denis > >>>> > >>>> > >>>>> On Apr 13, 2017, at 4:22 AM, ALEKSEY KUZNETSOV < > >>> alkuznetsov.sb@gmail.com> > >>>> wrote: > >>>>> > >>>>> any feedback? > >>>>> > >>>>> =D1=87=D1=82, 13 =D0=B0=D0=BF=D1=80. 2017 =D0=B3. =D0=B2 11:51, ALE= KSEY KUZNETSOV < > >>> alkuznetsov.sb@gmail.com > >>>>> : > >>>>> > >>>>>> You should run ExpiryPolicyTest. The output should contain strings > >>> like > >>>>>> contains? new AffinityKey("1", "1"): and contains?2 new > >>>> AffinityKey("1", " > >>>>>> 1"): and empty cursor? =3D > >>>>>> If you look at them you will see, that cache contains affinity key > >>> new > >>>>>> AffinityKey("1", "1") whereas cursor is empty(on second iteration)= . > >>> From > >>>>>> this output you can conclude SQL query returns icorrect data(empty > >>>> value) > >>>>>> > >>>>>> > >>>>>> =D1=87=D1=82, 13 =D0=B0=D0=BF=D1=80. 2017 =D0=B3. =D0=B2 3:42, Den= is Magda : > >>>>>> > >>>>>>> Bluntly speaking I have no idea where to look and what to expect. > >>> This > >>>> is > >>>>>>> output of the test execution of my machine: > >>>>>>> > >>>>>>> SQL res: [[1], [d]] > >>>>>>> 2 > >>>>>>> Op consume: 303 > >>>>>>> Value: org.ignite.test.EDU@22db8f4 > >>>>>>> SQL res: [] > >>>>>>> 0 > >>>>>>> Op consume: 9 > >>>>>>> Value: org.ignite.test.EDU@29caf222 > >>>>>>> SQL res: [] > >>>>>>> 0 > >>>>>>> Op consume: 15 > >>>>>>> Value: org.ignite.test.EDU@7cd1ac19 > >>>>>>> SQL res: [] > >>>>>>> 0 > >>>>>>> Op consume: 5 > >>>>>>> > >>>>>>> Please be more specific, there are too many files in the code. > >>>>>>> > >>>>>>> =E2=80=94 > >>>>>>> Denis > >>>>>>> > >>>>>>>> On Apr 12, 2017, at 4:50 AM, ALEKSEY KUZNETSOV < > >>>>>>> alkuznetsov.sb@gmail.com> wrote: > >>>>>>>> > >>>>>>>> So what do u think about the issue ? > >>>>>>>> > >>>>>>>> =D1=81=D1=80, 12 =D0=B0=D0=BF=D1=80. 2017 =D0=B3. =D0=B2 10:42, = ALEKSEY KUZNETSOV < > >>>>>>> alkuznetsov.sb@gmail.com>: > >>>>>>>> > >>>>>>>>> I have already attached simlified version. Shall i simplify it > >>> more ? > >>>>>>>>> > >>>>>>>>> =D0=B2=D1=82, 11 =D0=B0=D0=BF=D1=80. 2017 =D0=B3. =D0=B2 19:28,= Denis Magda : > >>>>>>>>> > >>>>>>>>> Can you attach the simplified version? Just want to avoid any > side > >>>>>>> effects. > >>>>>>>>> > >>>>>>>>> =E2=80=94 > >>>>>>>>> Denis > >>>>>>>>> > >>>>>>>>>> On Apr 11, 2017, at 9:14 AM, ALEKSEY KUZNETSOV < > >>>>>>> alkuznetsov.sb@gmail.com> > >>>>>>>>> wrote: > >>>>>>>>>> > >>>>>>>>>> I took it from > https://issues.apache.org/jira/browse/IGNITE-4401 > >>> < > >>>>>>>>> https://issues.apache.org/jira/browse/IGNITE-4401> and > >>> simplified . > >>>>>>> See > >>>>>>>>> in attached > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> =D0=B2=D1=82, 11 =D0=B0=D0=BF=D1=80. 2017 =D0=B3. =D0=B2 19:03= , Denis Magda >>>> >>>>>>>>> dmagda@apache.org>>: > >>>>>>>>>> Hello, > >>>>>>>>>> > >>>>>>>>>> Do you have sample code? > >>>>>>>>>> > >>>>>>>>>> =E2=80=94 > >>>>>>>>>> Denis > >>>>>>>>>>> On Apr 11, 2017, at 2:45 AM, ALEKSEY KUZNETSOV < > >>>>>>>>> alkuznetsov.sb@gmail.com > > >>> wrote: > >>>>>>>>>>> > >>>>>>>>>>> Hi, igniters! > >>>>>>>>>>> While doing https://issues.apache.org/jira/browse/IGNITE-4401 > < > >>>>>>>>> https://issues.apache.org/jira/browse/IGNITE-4401> ticket i cam= e > >>>>>>>>>>> across the fact that cache querying returns null , while cach= e > >>>> still > >>>>>>>>> has > >>>>>>>>>>> got entry. > >>>>>>>>>>> Cache query : SELECT nameProp FROM EDUProp WHERE EDUId =3D 1 > >>>>>>>>>>> Cache get operation : ignite().cache("eduPropCache").get(new > >>>>>>>>> AffinityKey("1", > >>>>>>>>>>> "1")) non-null > >>>>>>>>>>> I cannot even imagine what could be wrong with it. > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> -- > >>>>>>>>>>> > >>>>>>>>>>> *Best Regards,* > >>>>>>>>>>> > >>>>>>>>>>> *Kuznetsov Aleksey* > >>>>>>>>>> > >>>>>>>>>> -- > >>>>>>>>>> Best Regards, > >>>>>>>>>> > >>>>>>>>>> Kuznetsov Aleksey > >>>>>>>>>> > >>>>>>>>> > >>>>>>>>> -- > >>>>>>>>> > >>>>>>>>> *Best Regards,* > >>>>>>>>> > >>>>>>>>> *Kuznetsov Aleksey* > >>>>>>>>> > >>>>>>>> -- > >>>>>>>> > >>>>>>>> *Best Regards,* > >>>>>>>> > >>>>>>>> *Kuznetsov Aleksey* > >>>>>>> > >>>>>>> -- > >>>>>> > >>>>>> *Best Regards,* > >>>>>> > >>>>>> *Kuznetsov Aleksey* > >>>>>> > >>>>> -- > >>>>> > >>>>> *Best Regards,* > >>>>> > >>>>> *Kuznetsov Aleksey* > >>>> > >>>> > >>> > >>> > >>> -- > >>> Vladislav Pyatkov > >>> > >> -- > >> > >> *Best Regards,* > >> > >> *Kuznetsov Aleksey* > >> > > -- > > > > *Best Regards,* > > > > *Kuznetsov Aleksey* > > -- *Best Regards,* *Kuznetsov Aleksey* --001a11c0105855b38b054d57f6c8--